Remove calls to ReflectionProperty::setAccessible() (#5783)

This is a no-op in PHP 8.1 and up.
This commit is contained in:
Muqsit Rayyan 2023-05-31 18:03:14 +05:00 committed by GitHub
parent 20942b37eb
commit 3948dc4f75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View File

@ -316,9 +316,6 @@ class MemoryManager{
continue;
}
if(!$property->isPublic()){
$property->setAccessible(true);
}
if(!$property->isInitialized()){
continue;
}
@ -442,9 +439,6 @@ class MemoryManager{
continue;
}
}
if(!$property->isPublic()){
$property->setAccessible(true);
}
if(!$property->isInitialized($object)){
continue;
}

View File

@ -248,7 +248,6 @@ class CrashDump{
if(file_exists($filePath)){
$reflection = new \ReflectionClass(PluginBase::class);
$file = $reflection->getProperty("file");
$file->setAccessible(true);
foreach($this->server->getPluginManager()->getPlugins() as $plugin){
$filePath = Filesystem::cleanPath($file->getValue($plugin));
if(str_starts_with($frameCleanPath, $filePath)){