uses_arg_unpack = 1;
fbc = NULL;
- zend_compile_expr(&arg_node, arg->child[0]);
+ /* Unpacking may need to create interior references in the unpacked array,
+ * but apart from that does not have any other reference semantics: It should
+ * generate a notice if the variable does not exist and it should not convert
+ * the variable itself into a reference. As such, use an RW fetch. */
+ if (zend_is_variable(arg->child[0])) {
+ zend_compile_var(&arg_node, arg->child[0], BP_VAR_RW, 0);
+ } else {
+ zend_compile_expr(&arg_node, arg->child[0]);
+ }
opline = zend_emit_op(NULL, ZEND_SEND_UNPACK, &arg_node, NULL);
opline->op2.num = arg_count;
opline->result.var = (uint32_t)(zend_intptr_t)ZEND_CALL_ARG(NULL, arg_count);
int arg_num;
SAVE_OPLINE();
- args = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ if (OP1_TYPE & (IS_VAR|IS_CV)) {
+ args = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW);
+ } else {
+ args = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
+ }
arg_num = ZEND_CALL_NUM_ARGS(EX(call)) + 1;
ZEND_VM_C_LABEL(send_again):
int arg_num;
SAVE_OPLINE();
- args = get_zval_ptr_undef(opline->op1_type, opline->op1, &free_op1, BP_VAR_R);
+ if (opline->op1_type & (IS_VAR|IS_CV)) {
+ args = get_zval_ptr_ptr_undef(opline->op1_type, opline->op1, &free_op1, BP_VAR_RW);
+ } else {
+ args = get_zval_ptr_undef(opline->op1_type, opline->op1, &free_op1, BP_VAR_R);
+ }
arg_num = ZEND_CALL_NUM_ARGS(EX(call)) + 1;
send_again: