summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.c3
-rw-r--r--Zend/zend.h6
-rw-r--r--Zend/zend_globals.h4
3 files changed, 12 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index 95e8ad5f55..b0a8b27255 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1006,7 +1006,8 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
- || !(EG(user_error_handler_error_reporting) & type)) {
+ || !(EG(user_error_handler_error_reporting) & type)
+ || EG(error_handling) != EH_NORMAL) {
zend_error_cb(type, error_filename, error_lineno, format, args);
} else switch (type) {
case E_ERROR:
diff --git a/Zend/zend.h b/Zend/zend.h
index 765b8af3b9..e85f40394c 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -715,6 +715,12 @@ END_EXTERN_C()
#include "zend_operators.h"
#include "zend_variables.h"
+typedef enum {
+ EH_NORMAL = 0,
+ EH_SUPPRESS,
+ EH_THROW
+} zend_error_handling_t;
+
#endif /* ZEND_H */
/*
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index 25f248266b..9293715d78 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -218,11 +218,15 @@ struct _zend_executor_globals {
int user_error_handler_error_reporting;
zval *user_error_handler;
+ zval *user_error_handler_old;
zval *user_exception_handler;
zend_stack user_error_handlers_error_reporting;
zend_ptr_stack user_error_handlers;
zend_ptr_stack user_exception_handlers;
+ zend_error_handling_t error_handling;
+ zend_class_entry *exception_class;
+
/* timeout support */
int timeout_seconds;