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

WordPress Trac noreply at wordpress.org
Mon Sep 24 23:08:43 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:  Future Release
Component:  REST API      |     Version:  4.5
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  rest-api
--------------------------+-----------------------------

Comment (by duanestorey):

 Seems like the simplest thing to do is simply call wp_debug_mode() again
 after REST_REQUEST has been defined.  Looking at the code in
 wp_debug_mode, it would detect the variable then and set display_errors to
 0.  I looked briefly at moving wp_debug_mode in the wp-settings.php, but
 there is a lot of code in between where it is now and where it would end
 up, and I'd be worried about unintended consequences.

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


More information about the wp-trac mailing list