Browse Source

fixes potential passing of null to getUserGroupIds

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
tags/v21.0.0beta1
Arthur Schiwon 3 years ago
parent
commit
fd23614c08
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/private/Share20/DefaultShareProvider.php

+ 1
- 1
lib/private/Share20/DefaultShareProvider.php 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 = [];

Loading…
Cancel
Save