From 2bcddfc0421f7710d19a3462d4140d856bc66de1 Mon Sep 17 00:00:00 2001 From: westi Date: Sun, 30 Sep 2007 11:09:47 +0000 Subject: [PATCH] Enable developers to turn on notices from wp-config.php. Relates #3155. Fixes #5033 props Ozh. git-svn-id: http://svn.automattic.com/wordpress/trunk@6179 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 903f7fa93..ebd979c42 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -95,8 +95,12 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop( } timer_start(); -// Change to E_ALL for development/debugging -error_reporting(E_ALL ^ E_NOTICE); +// Add define('WPDEBUG',true); to wp-config.php to enable display of notices during development. +if (defined('WPDEBUG') and WPDEBUG == true) { + error_reporting(E_ALL); +} else { + error_reporting(E_ALL ^ E_NOTICE); +} // For an advanced caching plugin to use, static because you would only want one if ( defined('WP_CACHE') )