]> granicus.if.org Git - php/commitdiff
Fix a bug in call_user_function_ex()
authorZeev Suraski <zeev@php.net>
Sat, 15 Jan 2000 22:52:24 +0000 (22:52 +0000)
committerZeev Suraski <zeev@php.net>
Sat, 15 Jan 2000 22:52:24 +0000 (22:52 +0000)
Zend/zend_execute_API.c
Zend/zend_list.c

index 2cc1c70c0c8048c1d7f7638f7957bb279e97b8c3..fe7f7b301e53f07f7b0de206659dffe5d6fdc0c5 100644 (file)
@@ -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));
index fd579990b52e8768f100f6353e9063c8ec8d1b01..b154a51027e3de015076610579da4c77f76aac0e 100644 (file)
@@ -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);