From 12530a763b436c3d01d2668999dc343a95926389 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 19 Sep 2011 16:58:25 +0200 Subject: [ticket/10370] Use unset() on the first backtrace instead of checking in loop. PHPBB3-10370 --- phpBB/includes/functions.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'phpBB/includes/functions.php') diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index c2c8e489df..b203dcbea3 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3394,14 +3394,11 @@ function get_backtrace() $output = '
'; $backtrace = debug_backtrace(); - foreach ($backtrace as $number => $trace) - { - // We skip the first one, because it only shows this file/function - if ($number == 0) - { - continue; - } + // We skip the first one, because it only shows this file/function + unset($backtrace[0]); + foreach ($backtrace as $trace) + { // Strip the current directory from path $trace['file'] = (empty($trace['file'])) ? '' : phpbb_filter_root_path($trace['file']); $args = array(); -- cgit v1.2.1