summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c534088b58..7ae54da5bb 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4532,6 +4532,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
zend_op *opline;
uint32_t try_catch_offset;
uint32_t *jmp_opnums = safe_emalloc(sizeof(uint32_t), catches->children, 0);
+ uint32_t orig_fast_call_var = CG(context).fast_call_var;
if (catches->children == 0 && !finally_ast) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use try without catch or finally");
@@ -4554,8 +4555,8 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
zend_loop_var fast_call;
if (!(CG(active_op_array)->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
CG(active_op_array)->fn_flags |= ZEND_ACC_HAS_FINALLY_BLOCK;
- CG(context).fast_call_var = get_temporary_variable(CG(active_op_array));
}
+ CG(context).fast_call_var = get_temporary_variable(CG(active_op_array));
/* Push FAST_CALL on unwind stack */
fast_call.opcode = ZEND_FAST_CALL;
@@ -4665,6 +4666,8 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
opline->op1.var = CG(context).fast_call_var;
zend_update_jump_target_to_next(opnum_jmp);
+
+ CG(context).fast_call_var = orig_fast_call_var;
}
efree(jmp_opnums);