mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-24 18:37:52 +02:00
Wrap getConn() into a try catch to prevent the menu from being broken
This commit is contained in:
parent
a1ed493ad1
commit
217faab3fc
@ -160,10 +160,10 @@ class Menu extends Navigation
|
||||
$user = Dashboard::getUser();
|
||||
$dashboardItem = $this->getItem('dashboard');
|
||||
|
||||
$homes = Home::on(Dashboard::getConn());
|
||||
$homes->filter(Filter::equal('username', $user->getUsername()));
|
||||
|
||||
try {
|
||||
$homes = Home::on(Dashboard::getConn());
|
||||
$homes->filter(Filter::equal('username', $user->getUsername()));
|
||||
|
||||
foreach ($homes as $home) {
|
||||
$dashboardHome = new DashboardHomeItem($home->name, [
|
||||
'uuid' => $home->id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user