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.
typedef enum {
EH_NORMAL = 0,
- EH_SUPPRESS,
EH_THROW
} zend_error_handling_t;
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:
/* 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);