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

WordPress Trac noreply at wordpress.org
Wed Nov 11 20:10:46 UTC 2015


#34660: Query breaks when nopaging = false and posts_per_page = -1
-------------------------------------------------+-------------------------
 Reporter:  mgibbs189                            |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Query                                |  Release
 Severity:  normal                               |     Version:  trunk
 Keywords:  has-patch needs-docs needs-unit-     |  Resolution:
  tests                                          |     Focuses:
-------------------------------------------------+-------------------------
Changes (by boonebgorges):

 * keywords:  has-patch => has-patch needs-docs needs-unit-tests
 * milestone:  Awaiting Review => Future Release


Comment:

 > While this is an edge-case, these are both built-in query arguments, and
 a little extra error handling can't hurt. Whenever posts_per_page = -1, it
 doesn't make sense to use nopaging anyways.

 You might also say that when `nopaging=true`, `posts_per_page` should be
 ignored. That's what I meant when I asked "How would we decide which one
 you really meant".

 That being said, it's fine to me if one wins out over the other. But
 before we do that, let's have (a) unit tests describing the order of
 precedence, and (b) documentation, either inline or in the docblock, that
 explains how it works.

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


More information about the wp-trac mailing list