Skip to content

Commit c002b78

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 c6dd578 commit c002b78

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/private/Share20/Manager.php

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

10841084
foreach ($userIds as $userId) {
10851085
foreach ($shareTypes as $shareType) {
1086-
$provider = $this->factory->getProviderForType($shareType);
1086+
try {
1087+
$provider = $this->factory->getProviderForType($shareType);
1088+
} catch (ProviderException $e) {
1089+
continue;
1090+
}
1091+
10871092
if ($node instanceof Folder) {
10881093
/* We need to get all shares by this user to get subshares */
10891094
$shares = $provider->getSharesBy($userId, $shareType, null, false, -1, 0);

0 commit comments

Comments
 (0)