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

WordPress Trac noreply at wordpress.org
Mon May 22 16:07:54 UTC 2017


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

 * keywords:  has-patch has-unit-tests => has-patch has-unit-tests commit
 * owner:   => jnylen0
 * status:  new => accepted


Comment:

 @TimothyBlynJacobs in general, yes, if a patch has known issues then it is
 always useful to have a refreshed version on the ticket.

 [attachment:40344.2.diff] addresses the following issues:

 - Use `[0]` instead of `reset` to get the first element of the array
 - Core (including unit tests) cannot use `[ 'key' => 'value' ]` array
 syntax; we still support PHP 5.2
 - Trailing whitespace on blank lines

 Patch LGTM as well.  I'll commit when tests pass locally.

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


More information about the wp-trac mailing list