fixes potential passing of null to getUserGroupIds
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
130689ac2a
commit
a615e7dcfa
|
@ -881,7 +881,7 @@ class DefaultShareProvider implements IShareProvider {
|
||||||
$cursor->closeCursor();
|
$cursor->closeCursor();
|
||||||
} elseif ($shareType === IShare::TYPE_GROUP) {
|
} elseif ($shareType === IShare::TYPE_GROUP) {
|
||||||
$user = $this->userManager->get($userId);
|
$user = $this->userManager->get($userId);
|
||||||
$allGroups = $this->groupManager->getUserGroupIds($user);
|
$allGroups = ($user instanceof IUser) ? $this->groupManager->getUserGroupIds($user) : [];
|
||||||
|
|
||||||
/** @var Share[] $shares2 */
|
/** @var Share[] $shares2 */
|
||||||
$shares2 = [];
|
$shares2 = [];
|
||||||
|
|
Loading…
Reference in New Issue