]> source.dussan.org Git - nextcloud-server.git/commitdiff
Handle non existing settings again
authorCarl Schwan <carl@carlschwan.eu>
Mon, 30 May 2022 08:50:21 +0000 (10:50 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Mon, 30 May 2022 11:01:19 +0000 (11:01 +0000)
See https://github.com/nextcloud/server/pull/28189#issuecomment-1140874991

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
lib/private/Settings/Manager.php

index 84fbf9426b094566b2ce6b4d6d4c913942c0f6e8..05a286e4758ab99e6917abb12de8064a9f5f1f8c 100644 (file)
@@ -126,8 +126,13 @@ class Manager implements IManager {
                }
 
                foreach (array_unique($this->sectionClasses[$type]) as $index => $class) {
-                       /** @var IIconSection $section */
-                       $section = \OC::$server->get($class);
+                       try {
+                               /** @var IIconSection $section */
+                               $section = $this->container->get($class);
+                       } catch (QueryException $e) {
+                               $this->log->info($e->getMessage(), ['exception' => $e]);
+                               continue;
+                       }
 
                        $sectionID = $section->getID();