mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 02:09:42 +00:00
MemoryDump: fixed duplicated properties, reduce useless noise
This commit is contained in:
parent
46c4c65022
commit
efd67a132e
@ -406,22 +406,16 @@ class MemoryManager{
|
|||||||
"properties" => []
|
"properties" => []
|
||||||
];
|
];
|
||||||
|
|
||||||
for($original = $reflection; $reflection !== false; $reflection = $reflection->getParentClass()){
|
foreach($reflection->getProperties() as $property){
|
||||||
foreach($reflection->getProperties() as $property){
|
if($property->isStatic()){
|
||||||
if($property->isStatic()){
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$name = $property->getName();
|
|
||||||
if($reflection !== $original and !$property->isPublic()){
|
|
||||||
$name = $reflection->getName() . ":" . $name;
|
|
||||||
}
|
|
||||||
if(!$property->isPublic()){
|
|
||||||
$property->setAccessible(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
$info["properties"][$name] = self::continueDump($property->getValue($object), $objects, $refCounts, 0, $maxNesting, $maxStringSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!$property->isPublic()){
|
||||||
|
$property->setAccessible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$info["properties"][$property->getName()] = self::continueDump($property->getValue($object), $objects, $refCounts, 0, $maxNesting, $maxStringSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite($obData, json_encode($info, JSON_UNESCAPED_SLASHES) . "\n");
|
fwrite($obData, json_encode($info, JSON_UNESCAPED_SLASHES) . "\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user