mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#1878: wakeless: Supress disabled errors on live site
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@49702 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4f8d656067
commit
1273671cdf
@ -111,13 +111,11 @@ class Debug {
|
||||
}
|
||||
|
||||
static function warningHandler($errno, $errstr, $errfile, $errline, $errcontext) {
|
||||
if(error_reporting() == 0) return;
|
||||
if(self::$send_warnings_to) self::emailError(self::$send_warnings_to, $errno, $errstr, $errfile, $errline, $errcontext, "Warning");
|
||||
|
||||
if(Director::isDev()) {
|
||||
if(error_reporting() != 0) { // otherwise the error was suppressed with @
|
||||
self::showError($errno, $errstr, $errfile, $errline, $errcontext);
|
||||
die();
|
||||
}
|
||||
self::showError($errno, $errstr, $errfile, $errline, $errcontext);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user