[wp-trac] [WordPress Trac] #14184: HTTP API is not allowing '0' for headers and cookies.
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 19 01:06:03 UTC 2012
#14184: HTTP API is not allowing '0' for headers and cookies.
--------------------------+-----------------------
Reporter: mailnew2ster | Owner: dd32
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.5
Component: HTTP | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+-----------------------
Changes (by dd32):
* status: closed => reopened
* resolution: fixed =>
Comment:
> It makes your code fail to process a "0" body. Maybe there is near to
zero chance one would actually send a request with 'body' equal to "0",
but it's possible.
Changing that seems like it'll be a bit harder than simply replacing it.
Although {{{! isset( $r['body']) }}} seems like the best fit there, It
doesn't deal with empty arrays or objects, or cases where false is passed.
Although you may think "That's not what you should be passing.." It's an
expected behaviour due to php developers relying on the way that empty()
works.
A personal vendetta against the way a PHP function works isn't a valid
reason to stop using it in !WordPress, however, I'm re-opening this to
look into that case a bit closer.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14184#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list