diff --git a/src/Util/Filter/Consolidation.php b/src/Util/Filter/Consolidation.php index 8940f8e..054f5c0 100644 --- a/src/Util/Filter/Consolidation.php +++ b/src/Util/Filter/Consolidation.php @@ -15,6 +15,7 @@ use ReflectionFunction; use ReflectionObject; use Stringable; +use Throwable; use function array_key_exists; use function array_values; use function class_exists; @@ -761,9 +762,14 @@ public static function debugInfo( $reflectionObject = new ReflectionObject($object); $info = []; foreach ($reflectionObject->getProperties() as $property) { + if ($property->isPrivate()) { + /** @noinspection PhpExpressionResultUnusedInspection */ + $property->setAccessible(true); + } // no display if not initialized - if (($value = $property->getValue()) === null - && !$property->isInitialized() + if ($property->isStatic() + || ($value = $property->getValue($object)) === null + && !$property->isInitialized($object) ) { continue; }