WordPress.org

Make WordPress Core

Changeset 24724


Ignore:
Timestamp:
07/17/13 21:08:05 (9 months ago)
Author:
nacin
Message:

Ensure _deprecated_function() exists before calling it. wpdb currently does not have a full functions.php dependency, and this can break external inclusions. see #24774.

File:
1 edited

Legend:

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

    r24718 r24724  
    861861     */ 
    862862    function _weak_escape( $string ) { 
    863         if ( func_num_args() === 1 ) 
     863        if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) 
    864864            _deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' ); 
    865865        return addslashes( $string ); 
     
    919919     */ 
    920920    function escape( $data ) { 
    921         if ( func_num_args() === 1 ) 
     921        if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) 
    922922            _deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' ); 
    923923        if ( is_array( $data ) ) { 
Note: See TracChangeset for help on using the changeset viewer.