diff --git a/core/Core.php b/core/Core.php index 8df6f116b..064437e7f 100755 --- a/core/Core.php +++ b/core/Core.php @@ -21,6 +21,8 @@ /////////////////////////////////////////////////////////////////////////////// // ENVIRONMENT CONFIG +error_reporting(E_ALL); + /** * Include _ss_environment.php files */ @@ -169,7 +171,12 @@ require_once(MANIFEST_FILE); */ if(isset($_GET['debugmanifest'])) Debug::show(file_get_contents(MANIFEST_FILE)); - +// 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::isLive()) { + error_reporting(E_ALL ^ E_NOTICE); +} /////////////////////////////////////////////////////////////////////////////// // POST-MANIFEST COMMANDS diff --git a/main.php b/main.php index adb7f78a4..bea8b3935 100644 --- a/main.php +++ b/main.php @@ -47,13 +47,6 @@ if (function_exists('mb_http_output')) { mb_internal_encoding('UTF-8'); } -// 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(); // Apache rewrite rules use this