mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
a377a67e54
commit
daca02b9a7
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user