Make WordPress Core

Changeset 12384


Ignore:
Timestamp:
12/12/2009 09:29:20 AM (15 years ago)
Author:
azaozz
Message:

Do not show PHP 5.3 deprecated errors when WP_DEBUG is set, props mrmist nacin, fixes #10533

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-settings.php

    r12377 r12384  
    202202timer_start();
    203203
    204 // Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development.
    205 if ( defined('WP_DEBUG') && WP_DEBUG == true ) {
    206     error_reporting(E_ALL);
     204// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.
     205if ( defined('WP_DEBUG') && WP_DEBUG ) {
     206    if ( defined('E_DEPRECATED') )
     207        error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
     208    else
     209        error_reporting(E_ALL);
    207210    // 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
    208     if ( ! defined('WP_DEBUG_DISPLAY') || WP_DEBUG_DISPLAY == true )
     211    if ( ! defined('WP_DEBUG_DISPLAY') || WP_DEBUG_DISPLAY )
    209212        ini_set('display_errors', 1);
    210213    // Add define('WP_DEBUG_LOG', true); to enable php debug logging to WP_CONTENT_DIR/debug.log
    211     if ( defined('WP_DEBUG_LOG') && WP_DEBUG_LOG == true ) {
     214    if ( defined('WP_DEBUG_LOG') && WP_DEBUG_LOG ) {
    212215        ini_set('log_errors', 1);
    213216        ini_set('error_log', WP_CONTENT_DIR . '/debug.log');
Note: See TracChangeset for help on using the changeset viewer.