summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-08-30 21:15:50 +0200
committerGitHub <noreply@github.com>2020-08-30 21:15:50 +0200
commitc43189beaed0e6be06026b4aec9a1063257a5d65 (patch)
tree018beb19862fd30f3342a64d1e44b8535cb8a18d
parent5d4c4b54e62f1686d78bc3e71120ea5ef6921337 (diff)
parenteb4154cee0ac986d9adc6f7816c0d71f9cd75312 (diff)
downloadnextcloud-server-c43189beaed0e6be06026b4aec9a1063257a5d65.tar.gz
nextcloud-server-c43189beaed0e6be06026b4aec9a1063257a5d65.zip
Merge pull request #22476 from nextcloud/setting-sections-unique
ignore duplicate setting sections
-rw-r--r--lib/private/Settings/Manager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php
index ac4f8f9342c..b775e364c39 100644
--- a/lib/private/Settings/Manager.php
+++ b/lib/private/Settings/Manager.php
@@ -106,7 +106,7 @@ class Manager implements IManager {
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 @@ class Manager implements IManager {
$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;
}