Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#44534 closed defect (bug)

wp_debug_mode() does not turn off display_errors for REST requests — at Version 1

Reported by: chrisl27 Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.5
Component: REST API Keywords: has-patch fixed-5.0
Focuses: rest-api Cc:

Description (last modified by SergeyBiryukov)

There is code in wp-includes/load.php:336 that attempts to ini_set( 'display_errors', 0 ) for REST requests, but it checks defined( 'REST_REQUEST' ) too early in the process.

REST_REQUEST is defined in rest_api_loaded() where it is run from the parse_request action, after wp_debug_mode() has run.

Original changeset was: [36530]

For Trac ticket: #34915

Change History (1)

#1 @SergeyBiryukov
3 years ago

  • Description modified (diff)
  • Version changed from 4.9.7 to 4.5
Note: See TracTickets for help on using tickets.