[wp-trac] [WordPress Trac] #33372: WP_Query may return incorrect results when using negative values with parameter p.

WordPress Trac noreply at wordpress.org
Wed Aug 3 13:41:24 UTC 2016


#33372: WP_Query may return incorrect results when using negative values with
parameter p.
-------------------------------------------------+-------------------------
 Reporter:  giantrobot                           |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Query                                |  Release
 Severity:  normal                               |     Version:
 Keywords:  good-first-bug has-patch has-unit-   |  Resolution:
  tests                                          |     Focuses:
-------------------------------------------------+-------------------------

Comment (by boonebgorges):

 Replying to [comment:18 kouratoras]:
 > Replying to [comment:16 boonebgorges]:
 > > Why would we want 'p' set to `1` in the case of an object? Why set
 `p=1` if `404` is true?
 > The only reason doing that is not to pass an object to `intval()`.
 Otherwise, we do not need that value.

 It doesn't seem semantically correct to me. If I hook to 'parse_query' in
 a plugin, I'll see `p=1` (as well as `is_single=true`), which isn't
 accurate. Maybe use 0 instead.

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


More information about the wp-trac mailing list