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
This commit is contained in:
Andrew Nacin 2012-06-25 20:41:37 +00:00
parent 713783f4d0
commit 9e30b38e96
1 changed files with 5 additions and 1 deletions

View File

@ -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