backtrace.php
1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/** @var $displayData array */
$backtraceList = $displayData['backtrace'];
if (!$backtraceList)
{
return;
}
$class = isset($displayData['class']) ? $displayData['class'] : 'table table-striped table-bordered';
?>
<table cellpadding="0" cellspacing="0" class="Table <?php echo $class ?>">
<tr>
<td colspan="3" class="TD">
<strong>Call stack</strong>
</td>
</tr>
<tr>
<td class="TD">
<strong>#</strong>
</td>
<td class="TD">
<strong>Function</strong>
</td>
<td class="TD">
<strong>Location</strong>
</td>
</tr>
<?php foreach ($backtraceList as $k => $backtrace): ?>
<tr>
<td class="TD">
<?php echo $k + 1; ?>
</td>
<?php if (isset($backtrace['class'])): ?>
<td class="TD">
<?php echo $backtrace['class'] . $backtrace['type'] . $backtrace['function'] . '()'; ?>
</td>
<?php else: ?>
<td class="TD">
<?php echo $backtrace['function'] . '()'; ?>
</td>
<?php endif; ?>
<?php if (isset($backtrace['file'])): ?>
<td class="TD">
<?php echo JHtml::_('debug.xdebuglink', $backtrace['file'], $backtrace['line']); ?>
</td>
<?php else: ?>
<td class="TD">
 
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</table>