[wp-trac] [WordPress Trac] #39933: WP_REST_Request::get_param() doesn't work for getting body params on DELETE requests

WordPress Trac noreply at wordpress.org
Fri Feb 24 20:56:01 UTC 2017


#39933: WP_REST_Request::get_param() doesn't work for getting body params on DELETE
requests
--------------------------------------------------+----------------------
 Reporter:  mnelson4                              |       Owner:  jnylen0
     Type:  defect (bug)                          |      Status:  closed
 Priority:  normal                                |   Milestone:  4.7.3
Component:  REST API                              |     Version:
 Severity:  normal                                |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests fixed-major  |     Focuses:
--------------------------------------------------+----------------------
Changes (by SergeyBiryukov):

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


Comment:

 In [changeset:"40113"]:
 {{{
 #!CommitTicketReference repository="" revision="40113"
 REST API: Correctly parse body parameters for DELETE requests.

 DELETE was inadvertently omitted from the list of non-POST HTTP methods
 that should be able to accept body parameters. Parameters passed to DELETE
 requests as JSON are already parsed correctly; this commit fixes
 application/x-www-form-urlencoded parameters as well.

 Props mnelson4.
 Merges [40105] to the 4.7 branch.
 Fixes #39933.
 }}}

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


More information about the wp-trac mailing list