Fixing fatal errors that would arise if the Exception did not have a parent class.

This commit is contained in:
mark_story 2010-06-21 22:47:41 -04:00
parent 7ac76f3e0b
commit 22baf7fd45

View file

@ -265,7 +265,11 @@ class CakeHtmlReporter extends CakeBaseReporter {
$context = $message->getTrace();
$realContext = $context[3];
$class = new ReflectionClass($realContext['class']);
$deeper = $class->getParentClass()->getName() === 'PHPUnit_Framework_TestCase';
$deeper = false;
if ($class->getParentClass()) {
$deeper = $class->getParentClass()->getName() === 'PHPUnit_Framework_TestCase';
}
$deeper = $deeper || !$class->isSubclassOf('PHPUnit_Framework_TestCase');
if ($deeper) {
$realContext = $context[4];