Make WordPress Core


Ignore:
Timestamp:
11/18/2009 08:22:49 AM (16 years ago)
Author:
westi
Message:

Ensure WP_DEBUG is always defined and simplify the checks on it. Fixes #11090 props nacin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r12203 r12207  
    29282928 * function.
    29292929 *
    2930  * The current behavior is to trigger an user error if WP_DEBUG is defined and
    2931  * is true.
     2930 * The current behavior is to trigger an user error if WP_DEBUG is true.
    29322931 *
    29332932 * This function is to be used in every function in depreceated.php
     
    29502949
    29512950    // Allow plugin to filter the output error trigger
    2952     if( defined('WP_DEBUG') && ( true === WP_DEBUG ) && apply_filters( 'deprecated_function_trigger_error', true )) {
     2951    if( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true )) {
    29532952        if( !is_null($replacement) )
    29542953            trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
     
    29652964 * file.
    29662965 *
    2967  * The current behavior is to trigger an user error if WP_DEBUG is defined and
    2968  * is true.
     2966 * The current behavior is to trigger an user error if WP_DEBUG is true.
    29692967 *
    29702968 * This function is to be used in every file that is depreceated
     
    29872985
    29882986    // Allow plugin to filter the output error trigger
    2989     if( defined('WP_DEBUG') && ( true === WP_DEBUG ) && apply_filters( 'deprecated_file_trigger_error', true )) {
     2987    if( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
    29902988        if( !is_null($replacement) )
    29912989            trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) );
Note: See TracChangeset for help on using the changeset viewer.