[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:34:29 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 duanestorey):
Replying to [comment:12 danielbachhuber]:
> 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.
Your talking about the response header? Wouldn't that only get set once WP
understands that it's a REST response, which is basically too late (ie
after the debug init)? I would think as soon as a debug statement was
echoed the web server would output all response headers, which then
wouldn't work for detection. Or am I misunderstanding?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44534#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list