Make WordPress Core

Ticket #20953: 20953.patch

File 20953.patch, 836 bytes (added by kurtpayne, 13 years ago)

Use php-version specific options for debug_backtrace()

  • wp-includes/functions.php

     
    36223622 * @return string|array Either a string containing a reversed comma separated trace or an array of individual calls.
    36233623 */
    36243624function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pretty = true ) {
    3625         $trace  = debug_backtrace( false );
     3625
     3626        // Get the backtrace
     3627        if ( version_compare( PHP_VERSION, '5.2.5' ) < 0 )
     3628                $trace = debug_backtrace();
     3629        elseif ( version_compare( PHP_VERSION, '5.3.6' ) < 0 )
     3630                $trace = debug_backtrace( false );
     3631        else
     3632                $trace = debug_backtrace( 0 );
     3633
    36263634        $caller = array();
    36273635        $check_class = ! is_null( $ignore_class );
    36283636        $skip_frames++; // skip this function