From: Zeev Suraski Date: Sat, 15 Jan 2000 22:52:24 +0000 (+0000) Subject: Fix a bug in call_user_function_ex() X-Git-Tag: BEFORE_PRE_SHUTDOWN_REVERSE_PATCH~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=caaeb9ff124026b9b1e6f4b9c17016057c467bed;p=php Fix a bug in call_user_function_ex() --- diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 2cc1c70c0c..fe7f7b301e 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -322,6 +322,8 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio zend_op **original_opline_ptr; ELS_FETCH(); + *retval_ptr_ptr = NULL; + if (object) { if (object->type != IS_OBJECT) { return FAILURE; @@ -370,7 +372,6 @@ int call_user_function_ex(HashTable *function_table, zval *object, zval *functio zend_ptr_stack_push(&EG(argument_stack), (void *) (long) param_count); - *retval_ptr_ptr = NULL; if (function_state.function->type == ZEND_USER_FUNCTION) { calling_symbol_table = EG(active_symbol_table); ALLOC_HASHTABLE(EG(active_symbol_table)); diff --git a/Zend/zend_list.c b/Zend/zend_list.c index fd579990b5..b154a51027 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -139,7 +139,7 @@ ZEND_API void *zend_plist_find(int id, int *type) ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type) -{ +{ int rsrc_id; rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);