aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-10-20 10:03:10 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-10-20 21:55:07 +0000
commitb851446c6a6aa165f16759a8e7a80ccfd56623e2 (patch)
tree20caefbd487a828e993e9b57ecd8cc736a0a705d
parent9a5a80438acd6ef2ac4c7c82b6e3eeea02410faf (diff)
downloadnextcloud-server-b851446c6a6aa165f16759a8e7a80ccfd56623e2.tar.gz
nextcloud-server-b851446c6a6aa165f16759a8e7a80ccfd56623e2.zip
Also catch in getProvider
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/Share20/ProviderFactory.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php
index ff570cfa993..03078d7efb8 100644
--- a/lib/private/Share20/ProviderFactory.php
+++ b/lib/private/Share20/ProviderFactory.php
@@ -298,9 +298,16 @@ class ProviderFactory implements IProviderFactory {
}
foreach ($this->registeredShareProviders as $shareProvider) {
- /** @var IShareProvider $instance */
- $instance = $this->serverContainer->get($shareProvider);
- $this->shareProviders[$instance->identifier()] = $instance;
+ try {
+ /** @var IShareProvider $instance */
+ $instance = $this->serverContainer->get($shareProvider);
+ $this->shareProviders[$instance->identifier()] = $instance;
+ } catch (\Throwable $e) {
+ $this->serverContainer->get(LoggerInterface::class)->error(
+ $e->getMessage(),
+ ['exception' => $e]
+ );
+ }
}
if (isset($this->shareProviders[$id])) {