summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index bb14adf93d..7f7d8bce89 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -158,6 +158,7 @@ void init_executor(TSRMLS_D)
EG(user_error_handler) = NULL;
zend_ptr_stack_init(&EG(user_error_handlers));
+ zend_ptr_stack_init(&EG(user_exception_handlers));
EG(orig_error_reporting) = EG(error_reporting);
zend_objects_store_init(&EG(objects_store), 1024);
@@ -232,9 +233,17 @@ void shutdown_executor(TSRMLS_D)
FREE_ZVAL(EG(user_error_handler));
}
+ if (EG(user_exception_handler)) {
+ zval_dtor(EG(user_exception_handler));
+ FREE_ZVAL(EG(user_exception_handler));
+ }
+
zend_ptr_stack_clean(&EG(user_error_handlers), ZVAL_DESTRUCTOR, 1);
zend_ptr_stack_destroy(&EG(user_error_handlers));
+ zend_ptr_stack_clean(&EG(user_exception_handlers), ZVAL_DESTRUCTOR, 1);
+ zend_ptr_stack_destroy(&EG(user_exception_handlers));
+
EG(error_reporting) = EG(orig_error_reporting);
zend_objects_store_destroy(&EG(objects_store));
} zend_end_try();