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

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 14 01:42:42 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):

 first analysis:
 i could set query_vars to NULL instead of empty array in the
 {{{fill_query_vars()}}} function, if they are alredy setted to empty
 array.

 And then in the {{{get_posts()}}} function change the code to looks like
 {{{
 elseif ( $q['post__in'] === NULL) {
         $this->set_404();
 } elseif ( $q['post__in'] ) {
         ...
         ...
 }
 }}}
 but for some reason, inside fill_query_vars all the query_var inside of
 {{{$array_keys}}} is already setted to an empty array ... i don't get why
 they are already setted to empty array, if fill_query_vars is supposed to
 do so ... somebody can explain me this ?

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


More information about the wp-trac mailing list