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,6 +165,7 @@ class Menu extends Navigation
|
|||||||
$homes = Home::on(Dashboard::getConn());
|
$homes = Home::on(Dashboard::getConn());
|
||||||
$homes->filter(Filter::equal('username', $user->getUsername()));
|
$homes->filter(Filter::equal('username', $user->getUsername()));
|
||||||
|
|
||||||
|
try {
|
||||||
foreach ($homes as $home) {
|
foreach ($homes as $home) {
|
||||||
$dashboardHome = new DashboardHomeItem($home->name, [
|
$dashboardHome = new DashboardHomeItem($home->name, [
|
||||||
'uuid' => $home->id,
|
'uuid' => $home->id,
|
||||||
@ -175,6 +176,11 @@ class Menu extends Navigation
|
|||||||
|
|
||||||
$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