[wp-trac] Re: [WordPress Trac] #3155: Several "notice" messages in
WP 2.1-alpha3
WordPress Trac
wp-trac at lists.automattic.com
Tue Feb 13 20:21:57 GMT 2007
#3155: Several "notice" messages in WP 2.1-alpha3
-------------------------+--------------------------------------------------
Reporter: quix0r | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.2
Component: General | Version: 2.1
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by tombarta):
Is this a ticket about `E_NOTICE` errors or about caching? These are
orthogonal issues and it's confusing to see discussion on both of them in
a single ticket. IMHO, Wordpress should not be producing `E_NOTICE`
anywhere. The pattern that typically fixes this without affecting large
swaths of code is converting
{{{
if ( $my_super_option != '' ) ...
}}}
into
{{{
if ( isset($my_super_option) && ($my_super_option != '') ) ...
}}}
For readability's sake, it's best to avoid conditional defining of
variables, so checks like {{{if ($option)}}} make sense without
referencing undefined vars.
--
Ticket URL: <http://trac.wordpress.org/ticket/3155#comment:9>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list