navigation/dashboard: Provide fallback for icingadb items without icon

fixes #5177
This commit is contained in:
Johannes Meyer 2024-02-09 13:08:00 +01:00
parent 8ec42b05f8
commit 474f918458
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ use ipl\Web\Widget\Icon;
<div class="link-icon">
<?php
if (substr($item->getUrl()->getPath(), 0, 9) === 'icingadb/') {
echo new Icon($item->getIcon(), [ 'aria-hidden' => 1]);
echo new Icon($item->getIcon() ?: 'share', [ 'aria-hidden' => 1]);
} else {
echo $this->icon($item->getIcon() ?: 'forward', null, array('aria-hidden' => true));
}