Skip to content

Commit 8c087c8

Browse files
authored
Merge pull request #52043 from nextcloud/backport/52013/stable31
[stable31] fix: Handle missing share providers when promoting reshares
2 parents 470af3e + a943720 commit 8c087c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/private/Share20/Manager.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,12 @@ protected function promoteReshares(IShare $share): void {
10691069

10701070
foreach ($userIds as $userId) {
10711071
foreach ($shareTypes as $shareType) {
1072-
$provider = $this->factory->getProviderForType($shareType);
1072+
try {
1073+
$provider = $this->factory->getProviderForType($shareType);
1074+
} catch (ProviderException $e) {
1075+
continue;
1076+
}
1077+
10731078
if ($node instanceof Folder) {
10741079
/* We need to get all shares by this user to get subshares */
10751080
$shares = $provider->getSharesBy($userId, $shareType, null, false, -1, 0);

0 commit comments

Comments
 (0)