[wp-trac] [WordPress Trac] #19914: wp-app.php assumes elements exist
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 3 17:25:44 UTC 2012
#19914: wp-app.php assumes elements exist
--------------------------+------------------------------
Reporter: rmccue | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: AtomPub | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by kurtpayne):
* keywords: needs-patch has-patch => has-patch
Comment:
Replying to [comment:7 rmccue]:
> I think `isset( $entry->categories )` should probably be `!empty(
$entry->categories )` instead.
Agreed.
> For the strings, I think that should check `$var[1]` rather than just
`$var`.
Disagree. We should definitely check for `$var` before trying to access
`any sub elements. Switched these to `empty()` calls and reversed the
order of the ternary to be in-line with the coding standards.
>> Perhaps it would be better to disable error output and send errors to
an error log.
> Agreed.
This is already possible using wp-config.php:
{{{
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
}}}
Also, Gorilla worked beautifully this time!
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19914#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list