mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +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\Url;
|
||||||
use ipl\Web\Widget\Icon;
|
use ipl\Web\Widget\Icon;
|
||||||
use ipl\Web\Widget\StateBadge;
|
use ipl\Web\Widget\StateBadge;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class ConfigMenu extends BaseHtmlElement
|
class ConfigMenu extends BaseHtmlElement
|
||||||
{
|
{
|
||||||
@ -230,8 +231,13 @@ class ConfigMenu extends BaseHtmlElement
|
|||||||
|
|
||||||
protected function createMigrationBadge(): ?StateBadge
|
protected function createMigrationBadge(): ?StateBadge
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
$mm = MigrationManager::instance();
|
$mm = MigrationManager::instance();
|
||||||
$count = $mm->count();
|
$count = $mm->count();
|
||||||
|
} catch (Throwable $e) {
|
||||||
|
Logger::error('Failed to load pending migrations: %s', $e);
|
||||||
|
$count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$stateBadge = null;
|
$stateBadge = null;
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user