[wp-trac] [WordPress Trac] #17737: Be better at forcing data types for query vars

WordPress Trac noreply at wordpress.org
Tue Apr 28 06:02:02 UTC 2020


#17737: Be better at forcing data types for query vars
-------------------------------------+-----------------------------
 Reporter:  juliobox                 |       Owner:  SergeyBiryukov
     Type:  defect (bug)             |      Status:  reviewing
 Priority:  normal                   |   Milestone:  Future Release
Component:  Query                    |     Version:  3.0
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:
-------------------------------------+-----------------------------

Comment (by dd32):

 Replying to [comment:41 tellyworth]:
 > * `cat` and `author` both permit arrays, but they do it in an implicit
 way thanks to `preg_replace()`'s support for arrays in the `subject`
 param.

 Looks like any array support for `author` has been broken for at least 14
 years, I traced it being treated as a string back that far (and then gave
 up). It passes through the `preg_replace` but will hit a
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-
 query.php?marks=2227&rev=47557#L2220 urldecode down here]. `cat` does
 support arrays, and it's not-so-implicitely handled by merging arrays back
 to a comma string.

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


More information about the wp-trac mailing list