From d88ca858aab6b6e86fb9ecfe3a59349d3216e9b3 Mon Sep 17 00:00:00 2001 From: "Thies C. Arntzen" Date: Wed, 21 Aug 2002 13:58:20 +0000 Subject: [PATCH] zend_execute: make sure that current_execute_data points to the right thing after coming back from recursion. --- Zend/zend_execute.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 15ee053f85..4692a9f6e6 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2077,6 +2077,7 @@ do_fcall_common: ALLOC_ZVAL(EX(Ts)[EX(opline)->result.u.var].var.ptr); INIT_ZVAL(*(EX(Ts)[EX(opline)->result.u.var].var.ptr)); ((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object), return_value_used TSRMLS_CC); + EG(current_execute_data) = &execute_data; EX(Ts)[EX(opline)->result.u.var].var.ptr->is_ref = 0; EX(Ts)[EX(opline)->result.u.var].var.ptr->refcount = 1; if (!return_value_used) { @@ -2101,6 +2102,7 @@ do_fcall_common: EG(active_op_array) = (zend_op_array *) EX(function_state).function; zend_execute(EG(active_op_array) TSRMLS_CC); + EG(current_execute_data) = &execute_data; if (return_value_used && !EX(Ts)[EX(opline)->result.u.var].var.ptr) { if (!EG(exception)) { @@ -2732,6 +2734,7 @@ send_by_ref: EX(object) = NULL; zend_execute(new_op_array TSRMLS_CC); + EG(current_execute_data) = &execute_data; EX(function_state).function = saved_function; EX(object) = saved_object; -- 2.50.1