diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index ac4f8f9342c9a..b775e364c390f 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -106,7 +106,7 @@ protected function getSections(string $type): array { return $this->sections[$type]; } - foreach ($this->sectionClasses[$type] as $index => $class) { + foreach (array_unique($this->sectionClasses[$type]) as $index => $class) { try { /** @var ISection $section */ $section = \OC::$server->query($class); @@ -123,7 +123,7 @@ protected function getSections(string $type): array { $sectionID = $section->getID(); if (isset($this->sections[$type][$sectionID])) { - $this->log->logException(new \InvalidArgumentException('Section with the same ID already registered'), ['level' => ILogger::INFO]); + $this->log->logException(new \InvalidArgumentException('Section with the same ID already registered: ' . $sectionID . ', class: ' . $class), ['level' => ILogger::INFO]); continue; }