Explorar el Código

Merge pull request #22476 from nextcloud/setting-sections-unique

ignore duplicate setting sections
tags/v20.0.0beta3
Roeland Jago Douma hace 3 años
padre
commit
c43189beae
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2
    2
      lib/private/Settings/Manager.php

+ 2
- 2
lib/private/Settings/Manager.php Ver fichero

@@ -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;
}


Cargando…
Cancelar
Guardar