Updating HtmlReporter so it doesn't make notice errors when printing stack traces.

This commit is contained in:
mark_story 2010-07-20 23:49:38 -04:00
parent 572f79be67
commit 766d7d50c6

View file

@ -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);
}