Skip to content
Snippets Groups Projects
Unverified Commit 09501e17 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #23508 from nextcloud/fix/23355/iuser-expected-null-given

fixes potential passing of null to getUserGroupIds
parents 4bf891f6 fd23614c
No related branches found
No related tags found
No related merge requests found
...@@ -881,7 +881,7 @@ class DefaultShareProvider implements IShareProvider { ...@@ -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 = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment