[wp-trac] [WordPress Trac] #44534: wp_debug_mode() does not turn off display_errors for REST requests

WordPress Trac noreply at wordpress.org
Wed Oct 10 17:07:13 UTC 2018


#44534: wp_debug_mode() does not turn off display_errors for REST requests
--------------------------+-----------------------------
 Reporter:  chrisl27      |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  5.0
Component:  REST API      |     Version:  4.5
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  rest-api
--------------------------+-----------------------------

Comment (by danielbachhuber):

 Replying to [comment:11 duanestorey]:
 > And yet another possibly way would be to literally check the request URI
 for either /wp-json/ or ?rest_route=/ and disable.  That may be a bit
 clunky, but would probably capture all scenarios without modifying any
 requests themselves.
 >

 The `/wp-json/` path is filterable, which would happen much later in the
 stack, so I think inspecting `Content-Type` is more reliable and precise.

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


More information about the wp-trac mailing list