WordPress.org

Make WordPress Core

Changeset 11702


Ignore:
Timestamp:
07/09/09 20:51:52 (6 years ago)
Author:
westi
Message:

Add extra site debugging support to enable conditionally enable display_errors or a special error_log. Fixes #10202 props sivel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r11662 r11702  
    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') ) 
Note: See TracChangeset for help on using the changeset viewer.