Skip to content
Commit 1e5a99ed authored by Jeremy Felt's avatar Jeremy Felt
Browse files

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.

Merges [43730] to trunk.

Props chrisl27, duanestorey, earnjam.
Fixes #44534.

Built from https://develop.svn.wordpress.org/trunk@43983


git-svn-id: https://core.svn.wordpress.org/trunk@43815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 1c0fda84
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment