Skip to content

Commit

Permalink
patch bugs debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator committed Nov 16, 2023
1 parent 87ae66f commit e85252f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Util/Filter/Consolidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e85252f

Please sign in to comment.