[wp-trac] [WordPress Trac] #11987: Use ini_set('display_errors', 0) instead of ini_set('display_errors', 1); in wp-settings.php
WordPress Trac
wp-trac at lists.automattic.com
Sat Jan 23 22:21:40 UTC 2010
#11987: Use ini_set('display_errors', 0) instead of ini_set('display_errors', 1);
in wp-settings.php
--------------------------+-------------------------------------------------
Reporter: ocean90 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version: 2.9.1
Severity: normal | Resolution: invalid
Keywords: WP_DEBUG |
--------------------------+-------------------------------------------------
Comment(by nacin):
Not a problem, I was just pointing out for reference that wp-settings.php
was severely chopped up in trunk.
Here's how it works. If you define WP_DEBUG as true, then the
error_reporting level is set to E_ALL (minus E_DEPRECATED and E_STRICT if
PHP 5.3). Additionally, display_errors is forced on.
To prevent display_errors from being forced on, you must define
WP_DEBUG_DISPLAY as false, which is why this code works. (The statement
checks if WP_DEBUG_DISPLAY isn't defined or if it is true, which leaves it
being defined && is false as the override.)
WordPress leaves it to the server for whether display_errors should be on
otherwise. But when WP_DEBUG is on, it overrides the setting except when
WP_DEBUG_DISPLAY is defined as false.
Make sense? I tried to make it a little more clear in in trunk's default-
constants.php, such that it is defined by WP as true when not defined, and
in how they are handled in wp_debug_mode() in wp-includes/load.php.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11987#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list