Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-10-20 11:03:10 +0300
committerJoas Schilling <coding@schilljs.com>2022-10-20 11:03:10 +0300
commit9982909bc6e2a84064bcc9fc6fd992621a52d34a (patch)
tree7ee4ac12bb18b10515122093a0a842c8b6322d74
parent40d8ed9edb514dc5d5487e3b3c09a8c8c51b023e (diff)
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])) {