diff options
author | Joas Schilling <coding@schilljs.com> | 2022-10-20 10:03:10 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-10-20 21:55:07 +0000 |
commit | b851446c6a6aa165f16759a8e7a80ccfd56623e2 (patch) | |
tree | 20caefbd487a828e993e9b57ecd8cc736a0a705d | |
parent | 9a5a80438acd6ef2ac4c7c82b6e3eeea02410faf (diff) | |
download | nextcloud-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.php | 13 |
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])) { |