[wp-trac] [WordPress Trac] #14371: Allow user to specify error reporting level

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 21 05:30:38 UTC 2010


#14371: Allow user to specify error reporting level
------------------------------+---------------------------------------------
 Reporter:  wjm               |       Owner:                 
     Type:  enhancement       |      Status:  new            
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Warnings/Notices  |     Version:  3.0            
 Severity:  normal            |    Keywords:  has-patch      
------------------------------+---------------------------------------------

Comment(by wjm):

 Replying to [comment:6 nacin]:
 > At this point I'm -1 on this (unless it is tied to WP_DEBUG, possibly).
 There's an obvious potential that it would be misused to simply lower the
 reporting level instead of suppressing the display of warnings the proper
 way. Errors should be logged, not displayed, and errors we report
 (warnings/fatals) by default are the kinds that absolutely should be
 reported and logged.

 I was missing something. thanks Nacin for pointing it out.
 I have read your articles about using WP_DEBUG
 [http://www.andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/] and
 [http://www.andrewnacin.com/2010/03/22/deprecated-functions-and-wp_debug/]
 and i understand the situation better.

 Again, errors are displayed because by default wordpress doesn't set
 display_errors off in non-debuging mode.
 That is what may be confusing people.

 I always had WP_DEBUG off, because if I turned it off, I would get so many
 E_NOTICE errors that will be impossible to fix. That is confusing too, I
 think developers stay away from WP_DEBUG because of this,

 I see it can be very useful to have this feature in conjuction with
 WP_DEBUG (to avoid the issues stated above) and there may be no need to
 have it outside of it.

 Some ideas come into my mind.

 1. Shouldn't be setting display_errors off when not in debug mode?
 2. I see it as a security issue to have a fixed file name for the
 debug.log file. Maybe a constant can be defined to set its filename or
 maybe use a secret suffix.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14371#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list