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

WordPress Trac noreply at wordpress.org
Fri May 6 13:45:45 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          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+--------------------

Comment (by adamsilverstein):

 Replying to [comment:1 avagoldin]:
 > #36692
 > Maybe {{{ini_set( 'display_errors', 0 );}}} only if {{{WP_DEBUG}}} is
 false?
 >

 I agree with this suggestion: logging can be useful here to debug a
 failing ajax or xml-rpc callback. Even though displaying errors breaks the
 calls, it also exposes the errors more directly for developers who may not
 have file/log file access. If I had WP_DEBUG true I would expect to see
 errors regardless of the context.

 As a side note, it would be good to check wp-api calls to see if we follow
 the same logic of suppressing errors there.

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


More information about the wp-trac mailing list