mlanthaler: Don't show a error message and don't quit the script when the error was expected (statement with an @ in front to suppress the error). (merged from branches/gsoc)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41730 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-14 03:19:34 +00:00
parent a377a67e54
commit daca02b9a7

View File

@ -98,10 +98,12 @@ class Debug {
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();
}
}
}
static function fatalHandler($errno, $errstr, $errfile, $errline, $errcontext) {
if(self::$send_errors_to) self::emailError(self::$send_errors_to, $errno, $errstr, $errfile, $errline, $errcontext, "Error");