diff options
author | skjnldsv <skjnldsv@protonmail.com> | 2024-03-19 13:09:10 +0100 |
---|---|---|
committer | skjnldsv <skjnldsv@protonmail.com> | 2024-03-19 13:09:10 +0100 |
commit | c0e7ea55df724d3e7d507ab9fca78cf238f17193 (patch) | |
tree | cb477265e6deffdfd5dba6ec2bd2f36f642804a0 /lib/private | |
parent | bac58f997c162cd5a563606435d04a025ce3c93a (diff) | |
download | nextcloud-server-c0e7ea55df724d3e7d507ab9fca78cf238f17193.tar.gz nextcloud-server-c0e7ea55df724d3e7d507ab9fca78cf238f17193.zip |
fix(sharing): resolveGroupShares setPermissions on null
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 213423d4755..c22c65f6c7b 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -1153,10 +1153,12 @@ class DefaultShareProvider implements IShareProvider { $stmt = $query->execute(); while ($data = $stmt->fetch()) { - $shareMap[$data['parent']]->setPermissions((int)$data['permissions']); - $shareMap[$data['parent']]->setStatus((int)$data['accepted']); - $shareMap[$data['parent']]->setTarget($data['file_target']); - $shareMap[$data['parent']]->setParent($data['parent']); + if (array_key_exists($data['parent'], $shareMap)) { + $shareMap[$data['parent']]->setPermissions((int)$data['permissions']); + $shareMap[$data['parent']]->setStatus((int)$data['accepted']); + $shareMap[$data['parent']]->setTarget($data['file_target']); + $shareMap[$data['parent']]->setParent($data['parent']); + } } return array_values($shareMap); |