WordPress.org

Make WordPress Core

Ticket #10202: 10202.1.diff

File 10202.1.diff, 864 bytes (added by sivel, 5 years ago)

Following the suggestions from Denis-de-Bernardy

  • 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        if ( ! defined('WP_DEBUG_DISPLAY') || ( defined('WP_DEBUG_DISPLAY') && WP_DEBUG_DISPLAY == true ) ) 
     207                ini_set('display_errors', 1); 
     208        if ( defined('WP_DEBUG_LOG') && WP_DEBUG_LOG == true ) { 
     209                ini_set('log_errors', 1); 
     210                ini_set('error_log', WP_CONTENT_DIR . '/debug.log'); 
     211        } 
    206212} else { 
    207213        if ( defined('E_RECOVERABLE_ERROR') ) 
    208214                error_reporting(E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);