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

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 7 11:42:19 UTC 2010

#14184: HTTP API is not allowing '0' for headers and cookies.
 Reporter:  mailnew2ster  |       Owner:                         
     Type:  defect (bug)  |      Status:  new                    
 Priority:  normal        |   Milestone:  Awaiting Review        
Component:  HTTP          |     Version:                         
 Severity:  normal        |    Keywords:  has-patch needs-testing

Comment(by mailnew2ster):

 A name of a cookie can also be '0', you missed that.

 > If we are going to change how the strings are tested, then it will have
 to be debated on wp-hackers and in another ticket. It will also require
 changes in other areas, as most likely the empty() check is used
 throughout WordPress.
 I agree that the comparison method has to be uniform, but it also has to
 be correct. As you can see, the usage of empty() led to several bugs, and
 after fixing them, the comparison method is no more uniform, so what's the
 point? I'd avoid using empty(), because it doesn't do what the name
 suggests (for the string type, at least). But it's up to you, I'm not
 going to open new tickets about it or discussing it on IRC channels.

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

More information about the wp-trac mailing list