diff --git a/lib/private/App/InfoParser.php b/lib/private/App/InfoParser.php index 79a88b4623640..c0f69e615bdf7 100644 --- a/lib/private/App/InfoParser.php +++ b/lib/private/App/InfoParser.php @@ -226,7 +226,8 @@ public function parse($file) { */ private function isNavigationItem($data): bool { // Allow settings navigation items with no route entry - if ($data['type'] === 'settings') { + $type = $data['type'] ?? 'link'; + if ($type === 'settings') { return isset($data['name']); } return isset($data['name'], $data['route']); diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php index 2d1400714fea1..e3d5ac752d804 100644 --- a/lib/private/NavigationManager.php +++ b/lib/private/NavigationManager.php @@ -305,11 +305,9 @@ private function init() { if (!isset($nav['name'])) { continue; } - if (!isset($nav['route'])) { - // Allow settings navigation items with no route entry, all other types require one - if ($nav['type'] !== 'settings') { - continue; - } + // Allow settings navigation items with no route entry, all other types require one + if (!isset($nav['route']) && $nav['type'] !== 'settings') { + continue; } $role = isset($nav['@attributes']['role']) ? $nav['@attributes']['role'] : 'all'; if ($role === 'admin' && !$this->isAdmin()) {