diff --git a/dev/Debug.php b/dev/Debug.php index bb6d99272..a834a92ef 100644 --- a/dev/Debug.php +++ b/dev/Debug.php @@ -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() { - //set_error_handler('errorHandler', (E_ALL ^ E_NOTICE) ^ E_USER_NOTICE); set_error_handler('errorHandler', error_reporting()); set_exception_handler('exceptionHandler'); } @@ -615,6 +615,7 @@ function exceptionHandler($exception) { /** * Generic callback to catch standard PHP runtime errors thrown by the interpreter * 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 * @param unknown_type $errno diff --git a/main.php b/main.php index 49dbf268d..f120a1ab1 100644 --- a/main.php +++ b/main.php @@ -95,12 +95,12 @@ require_once('core/control/Director.php'); require_once('filesystem/Filesystem.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()) { error_reporting(E_ALL); } -*/ Session::start();