Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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)
  • Loading branch information...
commit 630bfcc823494b13a2c01ace49ad3471a79e4fc2 1 parent 6a10ed1
@halkyon halkyon authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 core/Core.php
View
15 core/Core.php
@@ -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 @@
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
Please sign in to comment.
Something went wrong with that request. Please try again.