summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 944c2aac39..bed4fb9685 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -480,16 +480,16 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
if (object_pp) {
/* TBI!! new object handlers */
- if(!IS_ZEND_STD_OBJECT(**object_pp)) {
- zend_error(E_WARNING, "Cannot use call_user_function on overloaded objects");
- return FAILURE;
- }
-
if (Z_TYPE_PP(object_pp) == IS_OBJECT) {
+ if(!IS_ZEND_STD_OBJECT(**object_pp)) {
+ zend_error(E_WARNING, "Cannot use call_user_function on overloaded objects");
+ return FAILURE;
+ }
+
function_table = &Z_OBJCE_PP(object_pp)->function_table;
calling_scope = Z_OBJCE_PP(object_pp);
} else if (Z_TYPE_PP(object_pp) == IS_STRING) {
- zend_class_entry *ce;
+ zend_class_entry **ce;
char *lc_class;
int found;
@@ -500,8 +500,8 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun
if (found == FAILURE)
return FAILURE;
- function_table = &ce->function_table;
- calling_scope = ce;
+ function_table = &(*ce)->function_table;
+ calling_scope = *ce;
object_pp = NULL;
} else
return FAILURE;