com php-src: Remove EH_SUPPRESS mode: Zend/zend.h m ain/main.c
| From: | Nikita Popov | Date: | Sat, 23 Dec 2017 12:28:09 +0000 |
| Subject: | com php-src: Remove EH_SUPPRESS mode: Zend/zend.h m ain/main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100688@lists.php.net to get a copy of this message | ||
Commit: 66c8a9d672cd1867fa02ccad499e68d132a5f947
Author: Nikita Popov <nikita.ppv@gmail.com> Sat, 23 Dec 2017 13:25:26 +0100
Parents: 18ddc2eb9c8d038d731a5947a15f8e0750f479b0
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=66c8a9d672cd1867fa02ccad499e68d132a5f947
Log:
Remove EH_SUPPRESS mode
It is unused and does not work in any meaningful way:
Warnings are suppressed, but everything else (both notices and
fatals) are not. It would make some sense if it suppressed
warnings and lower, but right now this is a pointless mode.
Changed paths:
M Zend/zend.h
M main/main.c
Diff:
diff --git a/Zend/zend.h b/Zend/zend.h
index cf6bd37..340e286 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -313,7 +313,6 @@ END_EXTERN_C()
typedef enum {
EH_NORMAL = 0,
- EH_SUPPRESS,
EH_THROW
} zend_error_handling_t;
diff --git a/main/main.c b/main/main.c
index 8842f8f..7dd6525 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1074,8 +1074,8 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const
u
PG(last_error_lineno) = error_lineno;
}
- /* according to error handling mode, suppress error, throw exception or show it */
- if (EG(error_handling) != EH_NORMAL) {
+ /* according to error handling mode, throw exception or show it */
+ if (EG(error_handling) == EH_THROW) {
switch (type) {
case E_ERROR:
case E_CORE_ERROR:
@@ -1097,7 +1097,7 @@ static ZEND_COLD void php_error_cb(int type, const char *error_filename, const
u
/* throw an exception if we are in EH_THROW mode
* but DO NOT overwrite a pending exception
*/
- if (EG(error_handling) == EH_THROW && !EG(exception)) {
+ if (!EG(exception)) {
zend_throw_error_exception(EG(exception_class), buffer, 0, type);
}
efree(buffer);