cvs: ZendEngine2 / zend_reflection_api.c
| From: | Marcus Boerger | Date: | Wed, 03 Nov 2004 21:11:49 +0000 |
| Subject: | cvs: ZendEngine2 / zend_reflection_api.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3138@lists.php.net to get a copy of this message | ||
helly Wed Nov 3 16:11:49 2004 EDT
Modified files:
/ZendEngine2 zend_reflection_api.c
Log:
- Fix invokeargs() with static methods
http://cvs.php.net/diff.php/ZendEngine2/zend_reflection_api.c?r1=1.136&r2=1.137&ty=u
Index: ZendEngine2/zend_reflection_api.c
diff -u ZendEngine2/zend_reflection_api.c:1.136 ZendEngine2/zend_reflection_api.c:1.137
--- ZendEngine2/zend_reflection_api.c:1.136 Sun Oct 31 10:30:53 2004
+++ ZendEngine2/zend_reflection_api.c Wed Nov 3 16:11:48 2004
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_reflection_api.c,v 1.136 2004/10/31 15:30:53 helly Exp $ */
+/* $Id: zend_reflection_api.c,v 1.137 2004/11/03 21:11:48 helly Exp $ */
#include "zend.h"
#include "zend_API.h"
#include "zend_exceptions.h"
@@ -2029,7 +2029,7 @@
GET_REFLECTION_OBJECT_PTR(mptr);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "oa", &object,
¶m_array) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a", &object,
¶m_array) == FAILURE) {
return;
}
@@ -2065,6 +2065,14 @@
object = NULL;
obj_ce = NULL;
} else {
+ if (!object) {
+ efree(params);
+ zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC,
+ "Trying to invoke non static method %s::%s without an object",
+ mptr->common.scope->name, mptr->common.function_name);
+ return;
+ }
+
obj_ce = Z_OBJCE_P(object);
if (!instanceof_function(obj_ce, mptr->common.scope TSRMLS_CC)) {