Tidy up logic for defining WP_DEBUG so we only define it if it isn't already. Fixes #11837 props nacin.
git-svn-id: https://develop.svn.wordpress.org/trunk@12685 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9a9700dff4
commit
7440e5516a
@ -202,7 +202,10 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(
|
|||||||
timer_start();
|
timer_start();
|
||||||
|
|
||||||
// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.
|
// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.
|
||||||
if ( defined('WP_DEBUG') && WP_DEBUG ) {
|
if ( !defined('WP_DEBUG') )
|
||||||
|
define( 'WP_DEBUG', false );
|
||||||
|
|
||||||
|
if ( WP_DEBUG ) {
|
||||||
if ( defined('E_DEPRECATED') )
|
if ( defined('E_DEPRECATED') )
|
||||||
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
|
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
|
||||||
else
|
else
|
||||||
@ -216,7 +219,6 @@ if ( defined('WP_DEBUG') && WP_DEBUG ) {
|
|||||||
ini_set('error_log', WP_CONTENT_DIR . '/debug.log');
|
ini_set('error_log', WP_CONTENT_DIR . '/debug.log');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
define('WP_DEBUG', false);
|
|
||||||
if ( defined('E_RECOVERABLE_ERROR') )
|
if ( defined('E_RECOVERABLE_ERROR') )
|
||||||
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);
|
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user