mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
Don't raise unhandled exceptions in menu context
This commit is contained in:
parent
ce2073d7bf
commit
12bc95099e
@ -16,6 +16,7 @@ use ipl\Html\Text;
|
||||
use ipl\Web\Url;
|
||||
use ipl\Web\Widget\Icon;
|
||||
use ipl\Web\Widget\StateBadge;
|
||||
use Throwable;
|
||||
|
||||
class ConfigMenu extends BaseHtmlElement
|
||||
{
|
||||
@ -230,8 +231,13 @@ class ConfigMenu extends BaseHtmlElement
|
||||
|
||||
protected function createMigrationBadge(): ?StateBadge
|
||||
{
|
||||
$mm = MigrationManager::instance();
|
||||
$count = $mm->count();
|
||||
try {
|
||||
$mm = MigrationManager::instance();
|
||||
$count = $mm->count();
|
||||
} catch (Throwable $e) {
|
||||
Logger::error('Failed to load pending migrations: %s', $e);
|
||||
$count = 0;
|
||||
}
|
||||
|
||||
$stateBadge = null;
|
||||
if ($count > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user