mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Fix exception when a module has no menu configuration
This commit is contained in:
parent
0b28bd31e5
commit
f4a00d24e5
@ -45,7 +45,10 @@ class Menu extends MenuItem
|
||||
$manager = Icinga::app()->getModuleManager();
|
||||
$menuConfigs = array(Config::app('menu'));
|
||||
foreach ($manager->listEnabledModules() as $moduleName) {
|
||||
$menuConfigs[] = Config::module($moduleName, 'menu');
|
||||
$moduleMenuConfig = Config::module($moduleName, 'menu');
|
||||
if ($moduleMenuConfig) {
|
||||
$menuConfigs[] = $moduleMenuConfig;
|
||||
}
|
||||
}
|
||||
return $menu->loadMenuItems($menu->flattenConfigs($menuConfigs));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user