From 7e3e8937e28447d02d3cc46dd2187cd016adce25 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 16 Sep 2014 17:05:24 +0200 Subject: [PATCH] Error API: catch all known error types Our error handler was not specifically dealing with some known error types, resulting in a default "catch all" error message e.g. for E_STRICT or E_RECOVERABLE_ERROR. Now all constants defined in http://php.net/errorfunc.constants at the time of this writing are handled, while retaining the default case for future error types. Fixes #19629 --- core/error_api.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/error_api.php b/core/error_api.php index 5029d65486..fa87d01000 100644 --- a/core/error_api.php +++ b/core/error_api.php @@ -120,7 +120,15 @@ function error_handler( $p_type, $p_error, $p_file, $p_line, array $p_context ) case E_NOTICE: $t_error_type = 'SYSTEM NOTICE'; break; + case E_STRICT: + $t_error_type = 'STRICT NOTICE'; + break; + case E_RECOVERABLE_ERROR: + # This should generally be considered fatal (like E_ERROR) + $t_error_type = 'SYSTEM ERROR'; + break; case E_DEPRECATED: + case E_USER_DEPRECATED: $t_error_type = 'DEPRECATED'; break; case E_USER_ERROR: