summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c
index f5c04099ea..ffbead83c8 100644
--- a/main/main.c
+++ b/main/main.c
@@ -2540,6 +2540,10 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
}
} zend_end_try();
+ if (EG(exception)) {
+ zend_exception_error(EG(exception), E_ERROR);
+ }
+
#if HAVE_BROKEN_GETCWD
if (old_cwd_fd != -1) {
fchdir(old_cwd_fd);
@@ -2665,6 +2669,9 @@ PHPAPI int php_lint_script(zend_file_handle *file)
retval = SUCCESS;
}
} zend_end_try();
+ if (EG(exception)) {
+ zend_exception_error(EG(exception), E_ERROR);
+ }
return retval;
}