mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Remove calls to ReflectionProperty::setAccessible() (#5783)
This is a no-op in PHP 8.1 and up.
This commit is contained in:
parent
20942b37eb
commit
3948dc4f75
@ -316,9 +316,6 @@ class MemoryManager{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$property->isPublic()){
|
|
||||||
$property->setAccessible(true);
|
|
||||||
}
|
|
||||||
if(!$property->isInitialized()){
|
if(!$property->isInitialized()){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -442,9 +439,6 @@ class MemoryManager{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!$property->isPublic()){
|
|
||||||
$property->setAccessible(true);
|
|
||||||
}
|
|
||||||
if(!$property->isInitialized($object)){
|
if(!$property->isInitialized($object)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,6 @@ class CrashDump{
|
|||||||
if(file_exists($filePath)){
|
if(file_exists($filePath)){
|
||||||
$reflection = new \ReflectionClass(PluginBase::class);
|
$reflection = new \ReflectionClass(PluginBase::class);
|
||||||
$file = $reflection->getProperty("file");
|
$file = $reflection->getProperty("file");
|
||||||
$file->setAccessible(true);
|
|
||||||
foreach($this->server->getPluginManager()->getPlugins() as $plugin){
|
foreach($this->server->getPluginManager()->getPlugins() as $plugin){
|
||||||
$filePath = Filesystem::cleanPath($file->getValue($plugin));
|
$filePath = Filesystem::cleanPath($file->getValue($plugin));
|
||||||
if(str_starts_with($frameCleanPath, $filePath)){
|
if(str_starts_with($frameCleanPath, $filePath)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user