Navigation/-Item: Fix `Variable '$classPath' is probably undefined`

This commit is contained in:
Sukhwinder Dhillon 2023-08-16 10:03:12 +02:00 committed by raviks789
parent eeff32d4ce
commit e2e582b095
2 changed files with 2 additions and 0 deletions

View File

@ -122,6 +122,7 @@ class Navigation implements ArrayAccess, Countable, IteratorAggregate
}
$item = null;
$classPath = null;
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $module) {
$classPath = 'Icinga\\Module\\'
. ucfirst($module->getName())

View File

@ -780,6 +780,7 @@ class NavigationItem implements IteratorAggregate
}
$renderer = null;
$classPath = null;
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $module) {
$classPath = 'Icinga\\Module\\' . ucfirst($module->getName()) . '\\' . static::RENDERER_NS . '\\' . $name;
if (class_exists($classPath)) {