Ticket #18391: 18391.diff
File 18391.diff, 2.4 KB (added by , 14 years ago) |
---|
-
wp-includes/default-constants.php
49 49 if ( !defined('WP_DEBUG') ) 50 50 define( 'WP_DEBUG', false ); 51 51 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 display_errors and not force errors to be displayed. Use false to force display_errors off. 53 53 if ( !defined('WP_DEBUG_DISPLAY') ) 54 54 define( 'WP_DEBUG_DISPLAY', true ); 55 55 -
wp-includes/load.php
249 249 * development environments. 250 250 * 251 251 * When WP_DEBUG_DISPLAY is true, WordPress will force errors to be displayed. 252 * WP_DEBUG_DISPLAY defaults to true. Defining it as falseprevents WordPress from253 * changing the global configuration setting. (Defining WP_DEBUG_DISPLAY as false254 * 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. 255 255 * 256 * When WP_DEBUG_LOG is true, errors will be logged to wp-content/debug.log. 256 * When WP_DEBUG_LOG is true, errors will be logged to wp-content/debug.log. When 257 * WP_DEBUG_LOG is a valid path, errors will be logged to the specified file. 257 258 * WP_DEBUG_LOG defaults to false. 258 259 * 259 260 * @access private … … 270 271 271 272 if ( WP_DEBUG_DISPLAY ) 272 273 ini_set( 'display_errors', 1 ); 274 elseif ( null !== WP_DEBUG_DISPLAY ) 275 ini_set( 'display_errors', 0 ); 273 276 274 277 if ( WP_DEBUG_LOG ) { 275 278 ini_set( 'log_errors', 1 ); 276 ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' ); 279 if ( in_array( WP_DEBUG_LOG, array( true, 'true', 'TRUE', 1, '1' ), true ) || 0 !== validate_file( WP_DEBUG_LOG ) ) 280 ini_set( 'error_log', WP_CONTENT_DIR . '/debug.log' ); 281 else 282 ini_set( 'error_log', WP_DEBUG_LOG ); 277 283 } 278 284 } else { 279 285 error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );