From 9e30b38e961f29619015ebc4777320d55f37ae16 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 25 Jun 2012 20:41:37 +0000 Subject: [PATCH] Don't call debug_backtrace() with an argument for PHP 5.2.4, which is currently the lowest version we support. props swekitsune, kurtpayne. fixes #20953. git-svn-id: https://develop.svn.wordpress.org/trunk@21113 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 24e1a29c83..eb32c9fcad 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3622,7 +3622,11 @@ function wp_allowed_protocols() { * @return string|array Either a string containing a reversed comma separated trace or an array of individual calls. */ function wp_debug_backtrace_summary( $ignore_class = null, $skip_frames = 0, $pretty = true ) { - $trace = debug_backtrace( false ); + if ( version_compare( PHP_VERSION, '5.2.5', '>=' ) ) + $trace = debug_backtrace( false ); + else + $trace = debug_backtrace(); + $caller = array(); $check_class = ! is_null( $ignore_class ); $skip_frames++; // skip this function