[wp-trac] [WordPress Trac] #12212: post__in can't manage empty array properly

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 15 14:37:12 UTC 2010


#12212: post__in can't manage empty array properly
--------------------------+-------------------------------------------------
 Reporter:  lifeless85    |       Owner:  ryan          
     Type:  defect (bug)  |      Status:  new           
 Priority:  normal        |   Milestone:  Future Release
Component:  Query         |     Version:  2.9.1         
 Severity:  normal        |    Keywords:  post__in      
--------------------------+-------------------------------------------------

Comment(by lifeless85):

 Ah! i also wanted to say, that in my opinion we should not initialize
 {{{$array_keys}}} to empty array because if we test it later by using
 {{{elseif ( $q['post__in'] )}}}, an empty array evals to false and an
 unset variable too.

 So we should not initialize them and get advantages in the empty array
 meaning ...

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


More information about the wp-trac mailing list