]> granicus.if.org Git - php/commitdiff
Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_stat...
authorDmitry Stogov <dmitry@zend.com>
Tue, 23 Apr 2013 19:43:23 +0000 (23:43 +0400)
committerDmitry Stogov <dmitry@zend.com>
Tue, 23 Apr 2013 19:43:23 +0000 (23:43 +0400)
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index eed924518eface65653f1e3f6417848eda29f6d4..02566f365ddccc1b7e074248a764364a2bbe2b25 100644 (file)
@@ -2710,7 +2710,9 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
                ZEND_VM_NEXT_OPCODE();
        }
 
-       if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+       if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
+           EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
+           !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
                ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
        }
 
index 6edc91a7424d5239d39d7de8ce651e1bc5acd738..f6220b0f5305924afd7f480f321cae8075b46ab2 100644 (file)
@@ -8399,7 +8399,9 @@ static int ZEND_FASTCALL  ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
                ZEND_VM_NEXT_OPCODE();
        }
 
-       if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+       if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
+           EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
+           !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
                return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }
 
@@ -22312,7 +22314,9 @@ static int ZEND_FASTCALL  ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
                ZEND_VM_NEXT_OPCODE();
        }
 
-       if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+       if (opline->extended_value == ZEND_DO_FCALL_BY_NAME &&
+           EX(function_state).function->type == ZEND_INTERNAL_FUNCTION &&
+           !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
                return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
        }