diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 880befbce08..cdc507478fe 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -4388,7 +4388,7 @@ ZEND_VM_C_LABEL(send_again): zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht)); - if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_TMP_VAR && Z_REFCOUNT_P(args) > 1) { + if ((OP1_TYPE & (IS_VAR|IS_CV)) && Z_REFCOUNT_P(args) > 1) { uint32_t i; int separate = 0; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index bcd29794c0a..722e1319d56 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1262,7 +1262,7 @@ send_again: zend_vm_stack_extend_call_frame(&EX(call), arg_num - 1, zend_hash_num_elements(ht)); - if (opline->op1_type != IS_CONST && opline->op1_type != IS_TMP_VAR && Z_REFCOUNT_P(args) > 1) { + if ((opline->op1_type & (IS_VAR|IS_CV)) && Z_REFCOUNT_P(args) > 1) { uint32_t i; int separate = 0;