[wp-trac] [WordPress Trac] #34074: wp_debug false still showing errors

WordPress Trac noreply at wordpress.org
Tue Dec 15 05:54:16 UTC 2015


#34074: wp_debug false still showing errors
--------------------------+------------------------------
 Reporter:  siebje        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.3.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by nacin):

 This one is interesting.

 `WP_DEBUG` is false by default. Allowing `define( 'WP_DEBUG_DISPLAY',
 false );`` to turn off `display_errors` when `WP_DEBUG` is *off* does not
 make a lot of sense to me. The `WP_DEBUG_DISPLAY` constants is already
 pretty magical, as it's a boolean but actually has three states.

 I think what is being proposed is this:

 {{{
 define( 'WP_DEBUG', false );
 define( 'WP_DEBUG_DISPLAY', false );
 }}}

 Instead of this:

 {{{
 define( 'WP_DEBUG', false );
 ini_set( 'display_errors', 0 );
 }}}

 Which is equivalent to this:
 {{{
 ini_set( 'display_errors', 0 );
 }}}

 I'd rather folks just stick to the PHP code here, rather than trying to
 mask it with some special WP constant.

 Generally - `display_errors` should never be enabled in production,
 anyway, which is also why WP doesn't go anywhere near the setting. The
 exception is `WP_DEBUG` forcing it on, which is also why
 `WP_DEBUG_DISPLAY` exists. I'd rather not repurpose the constant to also
 work outside of debug mode.

 This is a bit confusing -- I hope that explanation makes sense.

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


More information about the wp-trac mailing list