[wp-trac] [WordPress Trac] #11090: Standardize checking for WP_DEBUG
WordPress Trac
wp-trac at lists.automattic.com
Fri Nov 6 21:51:55 UTC 2009
#11090: Standardize checking for WP_DEBUG
------------------------------+---------------------------------------------
Reporter: nacin | Owner: westi
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: Warnings/Notices | Version: 2.9
Severity: normal | Keywords:
------------------------------+---------------------------------------------
Comment(by azaozz):
Don't see a good reason to explicitly forbid other values that evaluate to
true. Also `true == WP_DEBUG` doesn't seem to have a purpose. Looking at
other boolean constants, most are checked with:
{{{
if ( defined('CONSTANT') && CONSTANT )
// true
...
if ( !defined('CONSTANT') || !CONSTANT )
// false
}}}
which seems clear and concise. So if we are standardizing this perhaps
that is the way to go.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11090#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list