Revert "MemoryDump: fixed duplicated properties, reduce useless noise"

This reverts commit efd67a132ed432b47a74c8b98211597557c419d5.
This commit is contained in:
Dylan K. Taylor 2021-01-26 20:26:35 +00:00
parent 269a389a97
commit 5384e2ba9d
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -451,16 +451,22 @@ class MemoryManager{
$info["properties"] = [];
foreach($reflection->getProperties() as $property){
if($property->isStatic()){
continue;
}
for($original = $reflection; $reflection !== false; $reflection = $reflection->getParentClass()){
foreach($reflection->getProperties() as $property){
if($property->isStatic()){
continue;
}
if(!$property->isPublic()){
$property->setAccessible(true);
}
$name = $property->getName();
if($reflection !== $original and !$property->isPublic()){
$name = $reflection->getName() . ":" . $name;
}
if(!$property->isPublic()){
$property->setAccessible(true);
}
$info["properties"][$property->getName()] = self::continueDump($property->getValue($object), $objects, $refCounts, 0, $maxNesting, $maxStringSize);
$info["properties"][$name] = self::continueDump($property->getValue($object), $objects, $refCounts, 0, $maxNesting, $maxStringSize);
}
}
}