[wp-trac] [WordPress Trac] #38306: WP_REST_Request->get_params strips numeric keys

WordPress Trac noreply at wordpress.org
Wed Nov 2 05:52:14 UTC 2016


#38306: WP_REST_Request->get_params strips numeric keys
--------------------------------------+-----------------------
 Reporter:  sswells                   |       Owner:  joehoyle
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  4.7
Component:  REST API                  |     Version:  4.4
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------
Changes (by rmccue):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"39087"]:
 {{{
 #!CommitTicketReference repository="" revision="39087"
 REST API: Change method of merging parameters.

 `array_merge()` incorrectly reindexes numeric parameters, causing things
 like `{"123": true}` to be "dropped".

 Props sswells, joehoyle.
 Fixes #38306.
 }}}

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


More information about the wp-trac mailing list