[wp-trac] [WordPress Trac] #10556: Add a checked_array() to compare arrays like checked()

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 7 16:05:16 UTC 2010


#10556: Add a checked_array() to compare arrays like checked()
-------------------------+--------------------------------------------------
 Reporter:  sudar        |       Owner:  westi      
     Type:  enhancement  |      Status:  accepted   
 Priority:  normal       |   Milestone:  3.0        
Component:  Template     |     Version:             
 Severity:  normal       |    Keywords:  needs-patch
-------------------------+--------------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  has-patch => needs-patch


Comment:

 I like neither patches, personally. On the one hand side, we're checking
 using the === operator, whereas on the other we're using in_array(), which
 amounts to using the == operator.

 the === was introduced in order to distinguish an empty string from a
 numerical zero.

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


More information about the wp-trac mailing list