Make WordPress Core

Ticket #10202: 10202.2.diff

File 10202.2.diff, 1.0 KB (added by sivel, 15 years ago)

Reverting some of the logic and keep WP_CONTENT_DIR as the location of the debug.log

  • wp-settings.php

     
    201201timer_start();
    202202
    203203// Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development.
    204 if (defined('WP_DEBUG') and WP_DEBUG == true) {
     204if ( defined('WP_DEBUG') && WP_DEBUG == true ) {
    205205        error_reporting(E_ALL);
     206        // Add define('WP_DEBUG_DISPLAY', false); to wp-config.php to use the globally configured setting for display_errors and not force it to On
     207        if ( ! defined('WP_DEBUG_DISPLAY') || WP_DEBUG_DISPLAY == true )
     208                ini_set('display_errors', 1);
     209        // Add define('WP_DEBUG_LOG', true); to enable php debug logging to WP_CONTENT_DIR/debug.log
     210        if ( defined('WP_DEBUG_LOG') && WP_DEBUG_LOG == true ) {
     211                ini_set('log_errors', 1);
     212                ini_set('error_log', WP_CONTENT_DIR . '/debug.log');
     213        }
    206214} else {
    207215        if ( defined('E_RECOVERABLE_ERROR') )
    208216                error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);