fixes potential passing of null to getUserGroupIds

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2020-10-16 12:29:35 +02:00
parent 439e21e087
commit fd23614c08
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 1 additions and 1 deletions

View File

@ -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 = [];