]> granicus.if.org Git - php/commitdiff
Drop dead code in zend_call_method
authorNikita Popov <nikic@php.net>
Sat, 29 Oct 2016 15:11:55 +0000 (17:11 +0200)
committerNikita Popov <nikic@php.net>
Sat, 29 Oct 2016 15:11:55 +0000 (17:11 +0200)
As no_separation=1 is used this can not happen anymore.

Zend/zend_interfaces.c

index 8264cddc32ef3c3c4c34e793c7950e9f257f5df1..6eb4e17866177f7588deced6ee2fdff12bf31597 100644 (file)
@@ -36,8 +36,6 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
        int result;
        zend_fcall_info fci;
        zval retval;
-       HashTable *function_table;
-
        zval params[2];
 
        if (param_count > 0) {
@@ -109,13 +107,6 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
                        zend_error_noreturn(E_CORE_ERROR, "Couldn't execute method %s%s%s", obj_ce ? ZSTR_VAL(obj_ce->name) : "", obj_ce ? "::" : "", function_name);
                }
        }
-       /* copy arguments back, they might be changed by references */
-       if (param_count > 0 && Z_ISREF(params[0]) && !Z_ISREF_P(arg1)) {
-               ZVAL_COPY_VALUE(arg1, &params[0]);
-       }
-       if (param_count > 1 && Z_ISREF(params[1]) && !Z_ISREF_P(arg2)) {
-               ZVAL_COPY_VALUE(arg2, &params[1]);
-       }
        if (!retval_ptr) {
                zval_ptr_dtor(&retval);
                return NULL;