summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_execute.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_vm_execute.h')
-rw-r--r--Zend/zend_vm_execute.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 9f17756315..86dbd0ab37 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -15237,27 +15237,24 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDL
varptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1);
- if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
- (Z_VAR_FLAGS_P(varptr) & IS_VAR_RET_REF)) &&
- (Z_ISREF_P(varptr) || Z_TYPE_P(varptr) == IS_OBJECT)) {
+ if (EXPECTED(Z_ISREF_P(varptr) ||
+ ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
+ (opline->extended_value & ZEND_ARG_SEND_SILENT) :
+ ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num
+ )))) {
+ arg = ZEND_CALL_VAR(EX(call), opline->result.var);
+ ZVAL_COPY_VALUE(arg, varptr);
- ZVAL_MAKE_REF(varptr);
- } else {
- if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
- !(opline->extended_value & ZEND_ARG_SEND_SILENT) :
- !ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
- SAVE_OPLINE();
- zend_error(E_NOTICE, "Only variables should be passed by reference");
- arg = ZEND_CALL_VAR(EX(call), opline->result.var);
- ZVAL_COPY_VALUE(arg, varptr);
- ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
- }
+ ZEND_VM_NEXT_OPCODE();
}
+ SAVE_OPLINE();
+ zend_error(E_NOTICE, "Only variables should be passed by reference");
+
arg = ZEND_CALL_VAR(EX(call), opline->result.var);
ZVAL_COPY_VALUE(arg, varptr);
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
}
static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)