WordPress.org

Make WordPress Core

Opened 2 weeks ago

Last modified 2 weeks ago

#44534 new defect (bug)

wp_debug_mode() does not turn off display_errors for REST requests

Reported by: chrisl27 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.5
Component: REST API Keywords:
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
2 weeks ago

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