[wp-trac] [WordPress Trac] #40580: rest_ensure_response() can return WP_Error object, but is consequently not checked in get_item() method

WordPress Trac noreply at wordpress.org
Thu Apr 27 12:49:34 UTC 2017


#40580: rest_ensure_response() can return WP_Error object, but is consequently not
checked in get_item() method
-------------------------------------------------+-------------------------
 Reporter:  ruud@…                               |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  REST API                             |  Review
 Severity:  normal                               |     Version:  4.7
 Keywords:  has-patch dev-feedback needs-unit-   |  Resolution:
  tests                                          |     Focuses:
-------------------------------------------------+-------------------------
Changes (by jnylen0):

 * keywords:  has-patch dev-feedback => has-patch dev-feedback needs-unit-
     tests


Comment:

 Under what situations does `rest_ensure_response` return a `WP_Error`?

 This looks like a good thing to fix, one way or another, but this change
 does need unit tests.

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


More information about the wp-trac mailing list