From a615e7dcfa71bfe5cf47ac32817a53ec1404f10d Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 16 Oct 2020 12:29:35 +0200 Subject: [PATCH] fixes potential passing of null to getUserGroupIds Signed-off-by: Arthur Schiwon --- lib/private/Share20/DefaultShareProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index ecfe282dfbf..e43529086fd 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -881,7 +881,7 @@ class DefaultShareProvider implements IShareProvider { $cursor->closeCursor(); } elseif ($shareType === IShare::TYPE_GROUP) { $user = $this->userManager->get($userId); - $allGroups = $this->groupManager->getUserGroupIds($user); + $allGroups = ($user instanceof IUser) ? $this->groupManager->getUserGroupIds($user) : []; /** @var Share[] $shares2 */ $shares2 = []; -- 2.39.5