mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing fatal errors that would arise if the Exception did not have a parent class.
This commit is contained in:
parent
7ac76f3e0b
commit
22baf7fd45
1 changed files with 5 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue