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

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 12 16:24:49 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):

 Replying to [comment:5 scribu]:
 > You can use {{{$wp_query->set_404();}}}
 yes, tnx for your advice!

 But i still need to know if the array is empty due to
 {{{fill_query_vars()}}} or if it was setted and empty, before to use
 {{{$wp_query->set_404();}}}

 Maybe we can use it inside of {{{fill_query_vars()}}}, what's the point of
 filling query vars when you alredy know it will be no results ... i'll do
 a test in my test machine ...

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


More information about the wp-trac mailing list