Make WordPress Core

Changeset 18545


Ignore:
Timestamp:
08/13/2011 06:59:05 PM (13 years ago)
Author:
nacin
Message:

Force display_errors to off when WP_DEBUG_DISPLAY == false. Technically a backwards incompatible change - if you want the passthrough to php.ini (which false used to provide) then use WP_DEBUG_DISPLAY === null. see #18391.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-constants.php

    r17804 r18545  
    5050        define( 'WP_DEBUG', false );
    5151
    52     // Add define('WP_DEBUG_DISPLAY', false); to wp-config.php use the globally configured setting for display_errors and not force errors to be displayed.
     52    // Add define('WP_DEBUG_DISPLAY', null); to wp-config.php use the globally configured setting for
     53    // display_errors and not force errors to be displayed. Use false to force display_errors off.
    5354    if ( !defined('WP_DEBUG_DISPLAY') )
    5455        define( 'WP_DEBUG_DISPLAY', true );
  • trunk/wp-includes/load.php

    r18460 r18545  
    250250 *
    251251 * When WP_DEBUG_DISPLAY is true, WordPress will force errors to be displayed.
    252  * WP_DEBUG_DISPLAY defaults to true. Defining it as false prevents WordPress from
    253  * changing the global configuration setting. (Defining WP_DEBUG_DISPLAY as false
    254  * will never force errors to be hidden.)
     252 * WP_DEBUG_DISPLAY defaults to true. Defining it as null prevents WordPress from
     253 * changing the global configuration setting. Defining WP_DEBUG_DISPLAY as false
     254 * will force errors to be hidden.
    255255 *
    256256 * When WP_DEBUG_LOG is true, errors will be logged to wp-content/debug.log.
     
    271271        if ( WP_DEBUG_DISPLAY )
    272272            ini_set( 'display_errors', 1 );
     273        elseif ( null !== WP_DEBUG_DISPLAY )
     274            ini_set( 'display_errors', 0 );
    273275
    274276        if ( WP_DEBUG_LOG ) {
Note: See TracChangeset for help on using the changeset viewer.