[wp-trac] [WordPress Trac] #12212: post__in can't manage empty array properly
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 12 15:00:58 UTC 2010
#12212: post__in can't manage empty array properly
--------------------------+-------------------------------------------------
Reporter: lifeless85 | Owner: ryan
Type: defect (bug) | Status: new
Priority: high | Milestone: Future Release
Component: Query | Version: 2.9.1
Severity: major | Keywords: post__in
--------------------------+-------------------------------------------------
Comment(by chrisscott):
The problem with specifying an empty array for `post__in` is that
`fill_query_vars()` sets `$q['post__in']` to an empty array if it isn't
specified in the query so the elseif statement never evals to true.
It seems to me like this doesn't need to be changed and instead you should
be handling passing an empty array to `posts__in` in your code that calls
the query.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12212#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list