cvs: ZendEngine2 / zend_reflection_api.c
| From: | Andi Gutmans | Date: | Sun, 29 Feb 2004 18:31:30 +0000 |
| Subject: | cvs: ZendEngine2 / zend_reflection_api.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2426@lists.php.net to get a copy of this message | ||
andi Sun Feb 29 13:31:30 2004 EDT
Modified files:
/ZendEngine2 zend_reflection_api.c
Log:
- Apply fixes by Timm.
http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.89&r2=1.90&ty=u
Index: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.89 ZendEngine2/zend_reflection_api.c:1.90
--- ZendEngine2/zend_reflection_api.c:1.89 Wed Feb 25 20:06:18 2004
+++ ZendEngine2/zend_reflection_api.c Sun Feb 29 13:31:29 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_reflection_api.c,v 1.89 2004/02/26 01:06:18 helly Exp $ */
+/* $Id: zend_reflection_api.c,v 1.90 2004/02/29 18:31:29 andi Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_exceptions.h"
@@ -1800,9 +1800,9 @@
zval_add_ref(&argument);
}
} else {
+ convert_to_string_ex(&argument);
if (zend_lookup_class(Z_STRVAL_P(argument), Z_STRLEN_P(argument), &ce TSRMLS_CC) == FAILURE)
{
- zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
- "Class %s does not exist", Z_STRVAL_P(argument));
+ zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %s does not
exist", Z_STRVAL_P(argument));
return;
}
@@ -2302,6 +2302,11 @@
zend_fcall_info fci;
zend_fcall_info_cache fcc;
+ if (!(ce->constructor->common.fn_flags & ZEND_ACC_PUBLIC)) {
+ zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Access to non-public
constructor of class %s", ce->name);
+ return;
+ }
+
params = safe_emalloc(sizeof(zval **), argc, 0);
if (zend_get_parameters_array_ex(argc, params) == FAILURE) {
efree(params);