[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 31 21:38:11 UTC 2016


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

Comment (by kouratoras):

 For some reason, `is_scalar` returned `TRUE` in case of array input on
 HHVM. So, I added a check `is_array`.

 I also had an error in another test in the same file:
 {{{
 There was 1 error:

 1) Tests_Query_ParseQuery::test_parse_query_s_array
 strlen() expects parameter 1 to be string, array given
 }}}
 so I added an `is_array` check for `s` as well.

 Tests seem to succeed now in HHVM too.
 @boonebgorges can you take a look at the new patch?

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


More information about the wp-trac mailing list