mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating HtmlReporter so it doesn't make notice errors when printing stack traces.
This commit is contained in:
parent
572f79be67
commit
766d7d50c6
1 changed files with 7 additions and 1 deletions
|
@ -320,7 +320,13 @@ class CakeHtmlReporter extends CakeBaseReporter {
|
|||
$trace = $e->getTrace();
|
||||
$out = array();
|
||||
foreach ($trace as $frame) {
|
||||
$out[] = $frame['file'] . ' : ' . $frame['line'];
|
||||
if (isset($frame['file']) && isset($frame['line'])) {
|
||||
$out[] = $frame['file'] . ' : ' . $frame['line'];
|
||||
} elseif (isset($frame['class']) && isset($frame['function'])) {
|
||||
$out[] = $frame['class'] . '::' . $frame['function'];
|
||||
} else {
|
||||
$out[] = '[internal]';
|
||||
}
|
||||
}
|
||||
return implode('<br />', $out);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue