From 79a58abbbf45c8fc99242fd29a89936d9451599f Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Tue, 10 Feb 2004 17:01:55 +0000 Subject: [PATCH] Fix bug #26698 (exceptions handled properly during argument passing to functions) --- Zend/zend_execute.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index ab86f68daff..1ad0a2b992a 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4124,7 +4124,15 @@ int zend_handle_exception_handler(ZEND_OPCODE_HANDLER_ARGS) zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes; int i; int encapsulating_block=-1; + zval **stack_zval_pp; + stack_zval_pp = (zval **) EG(argument_stack).top_element - 1; + while (*stack_zval_pp != NULL) { + zval_ptr_dtor(stack_zval_pp); + EG(argument_stack).top_element--; + stack_zval_pp--; + } + for (i=0; ilast_try_catch; i++) { if (EG(active_op_array)->try_catch_array[i].try_op > op_num) { /* further blocks will not be relevant... */