summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend.c')
-rw-r--r--Zend/zend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index 72a7b4d588..6ee1a017b8 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1117,6 +1117,7 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
zend_stack loop_var_stack;
zend_stack delayed_oplines_stack;
zend_array *symbol_table;
+ zend_class_entry *orig_fake_scope;
/* Report about uncaught exception in case of fatal errors */
if (EG(exception)) {
@@ -1271,6 +1272,9 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
CG(in_compilation) = 0;
}
+ orig_fake_scope = EG(fake_scope);
+ EG(fake_scope) = NULL;
+
if (call_user_function_ex(CG(function_table), NULL, &orig_user_error_handler, &retval, 5, params, 1, NULL) == SUCCESS) {
if (Z_TYPE(retval) != IS_UNDEF) {
if (Z_TYPE(retval) == IS_FALSE) {
@@ -1283,6 +1287,8 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
zend_error_cb(type, error_filename, error_lineno, format, args);
}
+ EG(fake_scope) = orig_fake_scope;
+
if (in_compilation) {
CG(active_class_entry) = saved_class_entry;
RESTORE_STACK(loop_var_stack);