Skip to content

Commit 2684803

Browse files
danxuliubackportbot[bot]
authored andcommitted
fix: Handle missing share providers when promoting reshares
The provider for mail shares is not available when the "sharebymail" app is disabled, and in that case a "ProviderException" is thrown when trying to get it. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
1 parent 6b006a3 commit 2684803

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
@@ -1215,7 +1215,12 @@ protected function promoteReshares(IShare $share): void {
12151215

12161216
foreach ($userIds as $userId) {
12171217
foreach ($shareTypes as $shareType) {
1218-
$provider = $this->factory->getProviderForType($shareType);
1218+
try {
1219+
$provider = $this->factory->getProviderForType($shareType);
1220+
} catch (ProviderException $e) {
1221+
continue;
1222+
}
1223+
12191224
if ($node instanceof Folder) {
12201225
/* We need to get all shares by this user to get subshares */
12211226
$shares = $provider->getSharesBy($userId, $shareType, null, false, -1, 0);

0 commit comments

Comments
 (0)