From 3153720d3530635115b12633f9f98ebeb367d9d1 Mon Sep 17 00:00:00 2001 From: westi Date: Sun, 10 Jan 2010 10:57:01 +0000 Subject: [PATCH] Tidy up logic for defining WP_DEBUG so we only define it if it isn't already. Fixes #11837 props nacin. git-svn-id: http://svn.automattic.com/wordpress/trunk@12685 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index dd9d207ea..9c3cd1e0b 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -202,7 +202,10 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop( timer_start(); // 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') ) error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); else @@ -216,7 +219,6 @@ if ( defined('WP_DEBUG') && WP_DEBUG ) { ini_set('error_log', WP_CONTENT_DIR . '/debug.log'); } } else { - define('WP_DEBUG', false); if ( defined('E_RECOVERABLE_ERROR') ) error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR); else