mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 14:48:53 +00:00
[ticket/10370] Use unset() on the first backtrace instead of checking in loop.
PHPBB3-10370
This commit is contained in:
parent
9c0f75fd65
commit
12530a763b
1 changed files with 4 additions and 7 deletions
|
@ -3394,14 +3394,11 @@ function get_backtrace()
|
||||||
$output = '<div style="font-family: monospace;">';
|
$output = '<div style="font-family: monospace;">';
|
||||||
$backtrace = debug_backtrace();
|
$backtrace = debug_backtrace();
|
||||||
|
|
||||||
foreach ($backtrace as $number => $trace)
|
// We skip the first one, because it only shows this file/function
|
||||||
{
|
unset($backtrace[0]);
|
||||||
// We skip the first one, because it only shows this file/function
|
|
||||||
if ($number == 0)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
foreach ($backtrace as $trace)
|
||||||
|
{
|
||||||
// Strip the current directory from path
|
// Strip the current directory from path
|
||||||
$trace['file'] = (empty($trace['file'])) ? '' : phpbb_filter_root_path($trace['file']);
|
$trace['file'] = (empty($trace['file'])) ? '' : phpbb_filter_root_path($trace['file']);
|
||||||
$args = array();
|
$args = array();
|
||||||
|
|
Loading…
Add table
Reference in a new issue