diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index aae951eeed7..b04324c4ed3 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -4629,8 +4629,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, ANY) SAVE_OPLINE(); - array_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R); - ZVAL_DEREF(array_ptr); + array_ptr = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); if (OP1_TYPE != IS_CONST && Z_TYPE_P(array_ptr) == IS_OBJECT && Z_OBJCE_P(array_ptr)->get_iterator) { zend_class_entry *ce = Z_OBJCE_P(array_ptr); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a51941195c8..3eead75c730 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -3049,7 +3049,6 @@ static int ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER SAVE_OPLINE(); array_ptr = EX_CONSTANT(opline->op1); - ZVAL_DEREF(array_ptr); if (IS_CONST != IS_CONST && Z_TYPE_P(array_ptr) == IS_OBJECT && Z_OBJCE_P(array_ptr)->get_iterator) { zend_class_entry *ce = Z_OBJCE_P(array_ptr); @@ -8951,7 +8950,6 @@ static int ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_A SAVE_OPLINE(); array_ptr = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1); - ZVAL_DEREF(array_ptr); if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(array_ptr) == IS_OBJECT && Z_OBJCE_P(array_ptr)->get_iterator) { zend_class_entry *ce = Z_OBJCE_P(array_ptr); @@ -11753,8 +11751,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_A SAVE_OPLINE(); - array_ptr = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1); - ZVAL_DEREF(array_ptr); + array_ptr = _get_zval_ptr_var_deref(opline->op1.var, execute_data, &free_op1); if (IS_VAR != IS_CONST && Z_TYPE_P(array_ptr) == IS_OBJECT && Z_OBJCE_P(array_ptr)->get_iterator) { zend_class_entry *ce = Z_OBJCE_P(array_ptr); @@ -24134,8 +24131,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_AR SAVE_OPLINE(); - array_ptr = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var); - ZVAL_DEREF(array_ptr); + array_ptr = _get_zval_ptr_cv_deref_BP_VAR_R(execute_data, opline->op1.var); if (IS_CV != IS_CONST && Z_TYPE_P(array_ptr) == IS_OBJECT && Z_OBJCE_P(array_ptr)->get_iterator) { zend_class_entry *ce = Z_OBJCE_P(array_ptr);