[wp-trac] [WordPress Trac] #40344: WP_REST_Request::set_param() ignores parameter order.

WordPress Trac noreply at wordpress.org
Mon May 22 16:15:27 UTC 2017


#40344: WP_REST_Request::set_param() ignores parameter order.
---------------------------------------------+-----------------------
 Reporter:  TimothyBlynJacobs                |       Owner:  jnylen0
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  4.8
Component:  REST API                         |     Version:  4.4
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  rest-api
---------------------------------------------+-----------------------
Changes (by jnylen0):

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


Comment:

 In [changeset:"40815"]:
 {{{
 #!CommitTicketReference repository="" revision="40815"
 REST API: Fix changing parameters with `set_param()` for some requests.

 Prior to this commit, `WP_Rest_Request::get_param()` traversed through the
 parameter order but `WP_Rest_Request::set_param()` did not. For JSON
 requests (and likely other situations as well), this meant that changing a
 parameter with `set_param()` would have no effect on `get_param()`.

 Props TimothyBlynJacobs.
 Fixes #40344.
 }}}

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


More information about the wp-trac mailing list