mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Removed deprecated log/email logic from Debug (fixes #2573)
Was deprecated in 2009 witha682ab9c0e
, and removed in 2012 with9eca2d676f
This commit is contained in:
parent
3422761a41
commit
55729dfc27
@ -24,18 +24,6 @@
|
|||||||
*/
|
*/
|
||||||
class Debug {
|
class Debug {
|
||||||
|
|
||||||
/**
|
|
||||||
* @config
|
|
||||||
* @var string Email address to send error notifications
|
|
||||||
*/
|
|
||||||
private static $send_errors_to;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @config
|
|
||||||
* @var string Email address to send warning notifications
|
|
||||||
*/
|
|
||||||
private static $send_warnings_to;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @config
|
* @config
|
||||||
* @var String indicating the file where errors are logged.
|
* @var String indicating the file where errors are logged.
|
||||||
@ -262,18 +250,6 @@ class Debug {
|
|||||||
if(error_reporting() == 0) return;
|
if(error_reporting() == 0) return;
|
||||||
ini_set('display_errors', 0);
|
ini_set('display_errors', 0);
|
||||||
|
|
||||||
if(Config::inst()->get('Debug', 'send_warnings_to')) {
|
|
||||||
return self::emailError(
|
|
||||||
Config::inst()->get('Debug', 'send_warnings_to'),
|
|
||||||
$errno,
|
|
||||||
$errstr,
|
|
||||||
$errfile,
|
|
||||||
$errline,
|
|
||||||
$errcontext,
|
|
||||||
"Warning"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send out the error details to the logger for writing
|
// Send out the error details to the logger for writing
|
||||||
SS_Log::log(
|
SS_Log::log(
|
||||||
array(
|
array(
|
||||||
@ -286,10 +262,6 @@ class Debug {
|
|||||||
SS_Log::WARN
|
SS_Log::WARN
|
||||||
);
|
);
|
||||||
|
|
||||||
if(Config::inst()->get('Debug', 'log_errors_to')) {
|
|
||||||
self::log_error_if_necessary( $errno, $errstr, $errfile, $errline, $errcontext, "Warning");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Director::isDev()) {
|
if(Director::isDev()) {
|
||||||
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Warning");
|
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Warning");
|
||||||
} else {
|
} else {
|
||||||
@ -311,13 +283,6 @@ class Debug {
|
|||||||
public static function fatalHandler($errno, $errstr, $errfile, $errline, $errcontext) {
|
public static function fatalHandler($errno, $errstr, $errfile, $errline, $errcontext) {
|
||||||
ini_set('display_errors', 0);
|
ini_set('display_errors', 0);
|
||||||
|
|
||||||
if(Config::inst()->get('Debug', 'send_errors_to')) {
|
|
||||||
self::emailError(
|
|
||||||
Config::inst()->get('Debug', 'send_errors_to'), $errno,
|
|
||||||
$errstr, $errfile, $errline, $errcontext, "Error"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send out the error details to the logger for writing
|
// Send out the error details to the logger for writing
|
||||||
SS_Log::log(
|
SS_Log::log(
|
||||||
array(
|
array(
|
||||||
@ -330,10 +295,6 @@ class Debug {
|
|||||||
SS_Log::ERR
|
SS_Log::ERR
|
||||||
);
|
);
|
||||||
|
|
||||||
if(Config::inst()->get('Debug', 'log_errors_to')) {
|
|
||||||
self::log_error_if_necessary( $errno, $errstr, $errfile, $errline, $errcontext, "Error");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Director::isDev() || Director::is_cli()) {
|
if(Director::isDev() || Director::is_cli()) {
|
||||||
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Error");
|
return self::showError($errno, $errstr, $errfile, $errline, $errcontext, "Error");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user