diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2025-04-08 07:20:31 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-04-08 13:33:57 +0000 |
commit | c002b78a6efc5b8a874f77840196043a6c01a987 (patch) | |
tree | 7a796ad760f6f21036a591db00d99ae092fb79f0 | |
parent | c6dd578de1b7c44686f77b926c738c65a826984b (diff) | |
download | nextcloud-server-backport/52013/stable30.tar.gz nextcloud-server-backport/52013/stable30.zip |
fix: Handle missing share providers when promoting resharesbackport/52013/stable30
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>
-rw-r--r-- | lib/private/Share20/Manager.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 4eb27d611cd..6cacf0fd18f 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1083,7 +1083,12 @@ class Manager implements IManager { foreach ($userIds as $userId) { foreach ($shareTypes as $shareType) { - $provider = $this->factory->getProviderForType($shareType); + try { + $provider = $this->factory->getProviderForType($shareType); + } catch (ProviderException $e) { + continue; + } + if ($node instanceof Folder) { /* We need to get all shares by this user to get subshares */ $shares = $provider->getSharesBy($userId, $shareType, null, false, -1, 0); |