From b06103bfc5e9a9d49878630508c17ff4fcfb8024 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 12 Jul 2019 07:42:33 +0200 Subject: [PATCH] NavigationItemRenderer: Don't fail to render an icon if there's none fixes #3859 --- .../Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php b/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php index 3258d8bb4..74de8f60f 100644 --- a/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php +++ b/library/Icinga/Web/Navigation/Renderer/NavigationItemRenderer.php @@ -178,7 +178,7 @@ class NavigationItemRenderer : $item->getLabel(); if (($icon = $item->getIcon()) !== null) { $label = $this->view()->icon($icon) . $label; - } else { + } elseif ($item->getName()) { $firstLetter = $item->getName()[0]; $label = $this->view()->icon('letter', null, ['data-letter' => strtolower($firstLetter)]) . $label; }