[wp-trac] [WordPress Trac] #28099: Empty array passed to WP_Query post__in returns posts
WordPress Trac
noreply at wordpress.org
Fri Aug 11 00:49:18 UTC 2023
#28099: Empty array passed to WP_Query post__in returns posts
-------------------------------------+------------------------------
Reporter: danielbachhuber | Owner: wonderboymusic
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion needs-patch | Focuses:
-------------------------------------+------------------------------
Comment (by sc0ttkclark):
I haven't determined what code changed here to cause `post__in` to fail
like that. I just ran tests on WP 6.3 and `'post__in' => [ 0 ]` and that
works fine (returns no posts as expected).
Can anyone verify this independently, perhaps @Youdaman has a plugin or
theme that is filtering pre_get_posts or something and running something
akin to `array_filter()` on the `post__in` argument?
We might be spinning wheels here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28099#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list