[wp-trac] [WordPress Trac] #34660: Query breaks when nopaging = false and posts_per_page = -1

WordPress Trac noreply at wordpress.org
Wed Nov 11 18:25:32 UTC 2015


#34660: Query breaks when nopaging = false and posts_per_page = -1
--------------------------+------------------------------
 Reporter:  mgibbs189     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by swissspidy):

 This was recently discussed in #34474. Quoting @boonebgorges:

 > What seems to be breaking the query in your case is that you're passing
 `'nopaging' => false` along with `'posts_per_page' => -1`. Generally, if
 `WP_Query` sees `'posts_per_page' => -1`, it'll set `nopaging` to `true`.
 >
 > I don't think there's really anything we should do in `WP_Query` to
 account for this case, where you've passed contradictory parameters. (How
 would we decide which one you "really" meant?)

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


More information about the wp-trac mailing list