[wp-trac] [WordPress Trac] #36718: WP_Query::parse_query does not handle the "m" param correctly

WordPress Trac noreply at wordpress.org
Fri Apr 29 13:14:23 UTC 2016


#36718: WP_Query::parse_query does not handle the "m" param correctly
--------------------------+---------------------------
 Reporter:  vortfu        |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.6
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"37324"]:
 {{{
 #!CommitTicketReference repository="" revision="37324"
 Query: Discard non-scalar 'm' instead of attempting to sanitize.

 `WP_Query` discards most non-array date values ('year', 'monthnum', etc)
 by
 casting to integer. Since [25138], the 'm' parameter has been handled
 as a string; see #24884. However, the string-handling introduced in
 [25138]
 blindly attempted to handle arrays and other non-scalar types as strings,
 resulting in PHP notices and invalid MySQL syntax.

 Props vortfu.
 Fixes #36718.
 }}}

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


More information about the wp-trac mailing list