diff options
author | twosee <twose@qq.com> | 2020-09-10 17:36:04 +0800 |
---|---|---|
committer | twosee <twose@qq.com> | 2020-09-10 17:36:04 +0800 |
commit | bd1d11d352ddfb2c376060d7e7b282636dce1605 (patch) | |
tree | a9d958862030ba3f5f3758fd05e3c1bc9ab5c21f /ext/soap | |
parent | 298d2db62e9e9c13edc495a49cde2a928f8e4a5b (diff) | |
download | php-git-bd1d11d352ddfb2c376060d7e7b282636dce1605.tar.gz |
Simplify error type filter
Closes GH-6049.
Diffstat (limited to 'ext/soap')
-rw-r--r-- | ext/soap/soap.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 18dae72733..387beb78e5 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1843,12 +1843,7 @@ static zend_never_inline ZEND_COLD void soap_real_error_handler(int error_num, c use_exceptions = 1; } - if ((error_num == E_USER_ERROR || - error_num == E_COMPILE_ERROR || - error_num == E_CORE_ERROR || - error_num == E_ERROR || - error_num == E_PARSE) && - use_exceptions) { + if ((error_num & E_FATAL_ERRORS) && use_exceptions) { zval fault; char *code = SOAP_GLOBAL(error_code); if (code == NULL) { @@ -1870,12 +1865,7 @@ static zend_never_inline ZEND_COLD void soap_real_error_handler(int error_num, c int fault = 0; zval fault_obj; - if (error_num == E_USER_ERROR || - error_num == E_COMPILE_ERROR || - error_num == E_CORE_ERROR || - error_num == E_ERROR || - error_num == E_PARSE) { - + if (error_num & E_FATAL_ERRORS) { char* code = SOAP_GLOBAL(error_code); zend_string *buffer; zval outbuf; |