aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Share20/DefaultShareProvider.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-10-16 12:29:35 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-10-16 12:29:35 +0200
commitfd23614c08e6ea87f81af6f8305fbcb6e77d0fdf (patch)
tree5564b0fce48eb6a95013f8fb862a98968395e3cd /lib/private/Share20/DefaultShareProvider.php
parent439e21e087a45d3a436ad25befa31b99c435052a (diff)
downloadnextcloud-server-fd23614c08e6ea87f81af6f8305fbcb6e77d0fdf.tar.gz
nextcloud-server-fd23614c08e6ea87f81af6f8305fbcb6e77d0fdf.zip
fixes potential passing of null to getUserGroupIds
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Share20/DefaultShareProvider.php')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php2
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 = [];