#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:
Sam Minnee 2008-02-18 05:06:39 +00:00
parent 4f8d656067
commit 1273671cdf

View File

@ -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);
}
}