diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-10-16 14:57:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-16 14:57:54 +0200 |
commit | 09501e1710872362d04cffae5274efc184bf7ff1 (patch) | |
tree | 4e60795006b51e398a178e0e486d66ccc290d768 /lib | |
parent | 4bf891f60552a64984e6421ff74e02cdb39f9d51 (diff) | |
parent | fd23614c08e6ea87f81af6f8305fbcb6e77d0fdf (diff) | |
download | nextcloud-server-09501e1710872362d04cffae5274efc184bf7ff1.tar.gz nextcloud-server-09501e1710872362d04cffae5274efc184bf7ff1.zip |
Merge pull request #23508 from nextcloud/fix/23355/iuser-expected-null-given
fixes potential passing of null to getUserGroupIds
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 2 |
1 files changed, 1 insertions, 1 deletions
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 = []; |