MINOR error_reporting() now defaults to E_ALL | E_STRICT which means

strict errors are now reported *unless* the site is in live mode (which
supresses everything except fatal errors and warnings)
This commit is contained in:
Sean Harvey 2012-04-12 12:01:15 +12:00
parent 6a10ed19c1
commit 630bfcc823

View File

@ -38,8 +38,9 @@
///////////////////////////////////////////////////////////////////////////////
// ENVIRONMENT CONFIG
if(defined('E_DEPRECATED')) error_reporting(E_ALL & ~(E_STRICT));
else error_reporting(E_ALL);
// ALL errors are reported, including E_STRICT by default *unless* the site is in
// live mode, where reporting is limited to fatal errors and warnings (see later in this file)
error_reporting(E_ALL | E_STRICT);
/**
* Include _ss_environment.php files
@ -253,13 +254,11 @@ SS_TemplateLoader::instance()->pushManifest(new SS_TemplateManifest(
BASE_PATH, false, isset($_GET['flush'])
));
// 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()) {
if(defined('E_DEPRECATED')) error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT | E_NOTICE));
else error_reporting(E_ALL & ~E_NOTICE);
// If in live mode, ensure deprecation, strict and notices are not reported
if(Director::isLive()) {
error_reporting(E_ALL & ~(E_DEPRECATED | E_STRICT | E_NOTICE));
}
///////////////////////////////////////////////////////////////////////////////
// POST-MANIFEST COMMANDS