diff options
author | Stanislav Malyshev <stas@php.net> | 2002-03-14 12:18:01 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2002-03-14 12:18:01 +0000 |
commit | 3af5b15f309727363a6247ef7d38494d5f7656a7 (patch) | |
tree | af2ad05552bb1e6ed9d609b90ab1d01f11d09ee5 | |
parent | 77b5d8008140de0d3227b55fbfe34bb65d9bc271 (diff) | |
download | php-git-3af5b15f309727363a6247ef7d38494d5f7656a7.tar.gz |
Fix call_user_function
-rw-r--r-- | Zend/zend_execute_API.c | 16 |
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; |