mirror of
https://github.com/nextcloud/server.git
synced 2026-04-25 16:19:06 -04:00
Merge pull request #23508 from nextcloud/fix/23355/iuser-expected-null-given
fixes potential passing of null to getUserGroupIds
This commit is contained in:
commit
09501e1710
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue