[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
Thu Feb 23 20:02:16 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:  accepted
 Priority:  normal                           |   Milestone:  4.7.3
Component:  REST API                         |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------

Comment (by jnylen0):

 [attachment:39933.6.diff] is a slightly cleaner patch which avoids
 modifying the `assert` statement to include a message.  This isn't really
 necessary because PHPUnit will still provide the failing request method
 for us:

 {{{
 1) Tests_REST_Request::test_non_post_body_parameters with data set #2
 ('DELETE')
 Failed asserting that null matches expected 'bar'.
 }}}

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


More information about the wp-trac mailing list