[wp-trac] [WordPress Trac] #44534: wp_debug_mode() does not turn off display_errors for REST requests
WordPress Trac
noreply at wordpress.org
Mon Oct 15 22:05:21 UTC 2018
#44534: wp_debug_mode() does not turn off display_errors for REST requests
--------------------------+-----------------------
Reporter: chrisl27 | Owner: earnjam
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.0
Component: REST API | Version: 4.5
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: rest-api
--------------------------+-----------------------
Changes (by danielbachhuber):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"43730" 43730]:
{{{
#!CommitTicketReference repository="" revision="43730"
Load: Disable PHP errors for JSON requests
Because WP REST API requests aren't identified until `parse_request`, it's
impractical to reference the `REST_REQUEST` constant in `wp_debug_mode()`.
Instead, it's more helpful to assume that a request wanting a JSON
response probably doesn't want PHP errors breaking the response.
Props chrisl27, duanestorey, earnjam.
Fixes #44534.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44534#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list