[wp-trac] [WordPress Trac] #47188: Ensure that valid json is return for rest api, even when correct headers not sent.

WordPress Trac noreply at wordpress.org
Wed May 8 17:46:47 UTC 2019


#47188: Ensure that valid json is return for rest api, even when correct headers
not sent.
--------------------------+----------------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  4.4
 Severity:  normal        |   Keywords:  has-patch servehappy
  Focuses:  rest-api      |
--------------------------+----------------------------------
 Current when wp_die is called in php fatal error handler, valid json is
 only returned when json headers are returned as the function
 `wp_is_json_request` is used. See
 [https://core.trac.wordpress.org/ticket/45933 #45933].

 However, core could do more to return json when it knows the current
 request is a REST API call.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47188>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list