[wp-trac] [WordPress Trac] #44534: wp_debug_mode() does not turn off display_errors for REST requests

WordPress Trac noreply at wordpress.org
Sat Jul 7 02:01:40 UTC 2018


#44534: wp_debug_mode() does not turn off display_errors for REST requests
--------------------------+------------------------------
 Reporter:  chrisl27      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  REST API      |     Version:  4.5
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  rest-api
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * version:  4.9.7 => 4.5


Old description:

> 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: https://core.trac.wordpress.org/changeset/36530
>
> For Trac ticket: https://core.trac.wordpress.org/ticket/34915

New description:

 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

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44534#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list