mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Do not mutate the result of Permission->getChildren()
This commit is contained in:
@@ -28,7 +28,7 @@ abstract class DefaultPermissions{
|
||||
|
||||
public static function registerPermission(Permission $perm, ?Permission $parent = null) : Permission{
|
||||
if($parent instanceof Permission){
|
||||
$parent->getChildren()[$perm->getName()] = true;
|
||||
$parent->addChild($perm->getName(), true);
|
||||
}
|
||||
PermissionManager::getInstance()->addPermission($perm);
|
||||
|
||||
|
Reference in New Issue
Block a user