[wp-trac] [WordPress Trac] #14184: HTTP API is not allowing '0' for headers and cookies.

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 20 13:13:26 UTC 2012


#14184: HTTP API is not allowing '0' for headers and cookies.
--------------------------+-----------------------
 Reporter:  mailnew2ster  |       Owner:  dd32
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  3.5
Component:  HTTP          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------

Comment (by mailnew2ster):

 I suggest using the following empty_str function for testing string values
 for emptiness:
 {{{
 function empty_str(&$str)
 {
         return empty($str) && !(isset($str) && $str === "0");
 }
 }}}
 A test script:
 http://ideone.com/3RaCK

 What do you think?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14184#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list