[wp-trac] [WordPress Trac] #36708: Silence ini_set() in wp_debug_mode() if WP_DEBUG is off

WordPress Trac noreply at wordpress.org
Thu Apr 28 20:42:01 UTC 2016


#36708: Silence ini_set() in wp_debug_mode() if WP_DEBUG is off
----------------------------+-----------------------
 Reporter:  SergeyBiryukov  |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  4.5.2
Component:  Bootstrap/Load  |    Version:  4.5
 Severity:  normal          |   Keywords:  has-patch
  Focuses:                  |
----------------------------+-----------------------
 In [24564], we've added `ini_set( 'display_errors', 0 )` for XML-RPC
 requests.

 In [36571], we did the same for AJAX requests. Apparently this caused
 issues on sites where `ini_set()` has been disabled for security reasons,
 see comment:24:ticket:26262.

 As this line fires regardless of `WP_DEBUG` value and can lead to
 unexpected errors in production, we should add error suppression here (at
 least if `WP_DEBUG` is disabled), as we already do in every other instance
 of `ini_set()` in core.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36708>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list