[wp-trac] [WordPress Trac] #28099: Empty array passed to WP_Query post__in returns posts

WordPress Trac noreply at wordpress.org
Thu May 14 09:12:54 UTC 2020


#28099: Empty array passed to WP_Query post__in returns posts
-----------------------------+-----------------------------
 Reporter:  danielbachhuber  |       Owner:  wonderboymusic
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Query            |     Version:
 Severity:  normal           |  Resolution:  wontfix
 Keywords:  has-patch        |     Focuses:
-----------------------------+-----------------------------

Comment (by pikamander2):

 Just ran into this bug myself. I understand the backwards compatibility
 argument, but the current behavior makes no sense. It would be far more
 intuitive if a blank array resulted in no posts.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/28099#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list