[wp-trac] [WordPress Trac] #19914: wp-app.php assumes elements exist
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 3 17:41:00 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 |
--------------------------+------------------------------
Comment (by rmccue):
Replying to [comment:8 kurtpayne]:
> Disagree. We should definitely check for `$var` before trying to access
`any sub elements.
I meant to check both, sorry. Otherwise `$var` could be an empty array and
then cause it to error.
> Switched these to `empty()` calls and reversed the order of the ternary
to be in-line with the coding standards.
I think you actually want isset there, since it could be an empty string
(which would give the same result of course, but less efficiently).
> This is already possible using wp-config.php:
Not separately for APP/XMLRPC endpoints though. Whether that actually
warrants a patch is a different story though.
> Also, Gorilla worked beautifully this time!
Awesome, glad to hear it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19914#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list