mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix trying to read uninitialized properties when fetching call stack during exception handling
"Typed property ... must not be accessed before initialization" error was displayed instead of CakePHP error page with call stack
This commit is contained in:
parent
1cd99ff3e0
commit
1a06136cb0
1 changed files with 5 additions and 0 deletions
|
@ -593,6 +593,11 @@ class Debugger {
|
|||
$reflectionProperties = $ref->getProperties($filter);
|
||||
foreach ($reflectionProperties as $reflectionProperty) {
|
||||
$reflectionProperty->setAccessible(true);
|
||||
|
||||
if (!$reflectionProperty->isInitialized($var)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$property = $reflectionProperty->getValue($var);
|
||||
|
||||
$value = static::_export($property, $depth - 1, $indent);
|
||||
|
|
Loading…
Reference in a new issue