[wp-trac] [WordPress Trac] #24884: WP_Query's "m" parameter is cast to an int which is a problem due to 32-bit signed intergers

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


#24884: WP_Query's "m" parameter is cast to an int which is a problem due to 32-bit
signed intergers
--------------------------+---------------------
 Reporter:  Viper007Bond  |       Owner:  nacin
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  3.7
Component:  Query         |     Version:  3.5.2
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |
--------------------------+---------------------

Comment (by boonebgorges):

 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/24884#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list