mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Reinstated error_handling(E_ALL) for dev environments in main.php after clarifying with sam - we want to force developers to recard notice-level errors unless they expicitly opt-out in their _config.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60643 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3663221773
commit
67e427cdf6
@ -204,10 +204,10 @@ class Debug {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load error handlers into environment
|
* Load error handlers into environment.
|
||||||
|
* Caution: The error levels default to E_ALL is the site is in dev-mode (set in main.php).
|
||||||
*/
|
*/
|
||||||
static function loadErrorHandlers() {
|
static function loadErrorHandlers() {
|
||||||
//set_error_handler('errorHandler', (E_ALL ^ E_NOTICE) ^ E_USER_NOTICE);
|
|
||||||
set_error_handler('errorHandler', error_reporting());
|
set_error_handler('errorHandler', error_reporting());
|
||||||
set_exception_handler('exceptionHandler');
|
set_exception_handler('exceptionHandler');
|
||||||
}
|
}
|
||||||
@ -615,6 +615,7 @@ function exceptionHandler($exception) {
|
|||||||
/**
|
/**
|
||||||
* Generic callback to catch standard PHP runtime errors thrown by the interpreter
|
* Generic callback to catch standard PHP runtime errors thrown by the interpreter
|
||||||
* or manually triggered with the user_error function.
|
* or manually triggered with the user_error function.
|
||||||
|
* Caution: The error levels default to E_ALL is the site is in dev-mode (set in main.php).
|
||||||
*
|
*
|
||||||
* @ignore
|
* @ignore
|
||||||
* @param unknown_type $errno
|
* @param unknown_type $errno
|
||||||
|
6
main.php
6
main.php
@ -95,12 +95,12 @@ require_once('core/control/Director.php');
|
|||||||
require_once('filesystem/Filesystem.php');
|
require_once('filesystem/Filesystem.php');
|
||||||
require_once("core/Session.php");
|
require_once("core/Session.php");
|
||||||
|
|
||||||
/*
|
// If this is a dev site, enable php error reporting
|
||||||
// If this is a dev site, enable php error reporting
|
// This is necessary to force developers to acknowledge and fix
|
||||||
|
// notice level errors (you can override this directive in your _config.php)
|
||||||
if (Director::isDev()) {
|
if (Director::isDev()) {
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
Session::start();
|
Session::start();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user