[wp-hackers] Re: PHP notice warnings

Ozh ozh at planetozh.com
Fri Sep 21 06:16:25 GMT 2007


On 9/21/07, ozgreg <wphackers at galleryembedded.com> wrote:
> or better still, instead move the debug settings to wp-config.php like gallery2 does so we can turn them off and on depending on the role of the site..
>

I was exactly going to suggest this. It should be up to the blogger to
enable error reporting.

I suggest something like the following, to avoid clutterring of wp-config.php
-> in wp-settings:
if (defined('WPDEBUG') and WPDEBUG == true) {
    error_reporting(E_ALL);
} else {
    error_reporting(E_ALL ^ E_NOTICE);
}

-> in wp-config, optional define('WPDEBUG', true) for developpers


Ozh
-- 
http://FrenchFragFactory.net ~ Daily Quake News
   http://planetOzh.com ~ Useless Blog & Code


More information about the wp-hackers mailing list