mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 18:59:04 +02:00
Menu: Swallow silently any DB issue in the main menu
This commit is contained in:
parent
fd9c547dde
commit
945a69f0cd
@ -165,15 +165,21 @@ class Menu extends Navigation
|
||||
$homes = Home::on(Dashboard::getConn());
|
||||
$homes->filter(Filter::equal('username', $user->getUsername()));
|
||||
|
||||
foreach ($homes as $home) {
|
||||
$dashboardHome = new DashboardHomeItem($home->name, [
|
||||
'uuid' => $home->id,
|
||||
'label' => t($home->label),
|
||||
'priority' => $home->priority,
|
||||
'type' => $home->type,
|
||||
]);
|
||||
try {
|
||||
foreach ($homes as $home) {
|
||||
$dashboardHome = new DashboardHomeItem($home->name, [
|
||||
'uuid' => $home->id,
|
||||
'label' => t($home->label),
|
||||
'priority' => $home->priority,
|
||||
'type' => $home->type,
|
||||
]);
|
||||
|
||||
$dashboardItem->addChild($dashboardHome);
|
||||
$dashboardItem->addChild($dashboardHome);
|
||||
}
|
||||
} catch (\Exception $_) {
|
||||
// Nothing to do
|
||||
// Any database issue will be noticed soon enough, so prevent the Menu
|
||||
// from being ruined in any case.
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user