From e2e582b09565b4cbb3461a24f703fba47586ba62 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Wed, 16 Aug 2023 10:03:12 +0200 Subject: [PATCH] Navigation/-Item: Fix `Variable '$classPath' is probably undefined` --- library/Icinga/Web/Navigation/Navigation.php | 1 + library/Icinga/Web/Navigation/NavigationItem.php | 1 + 2 files changed, 2 insertions(+) diff --git a/library/Icinga/Web/Navigation/Navigation.php b/library/Icinga/Web/Navigation/Navigation.php index 85460aff3..813e103de 100644 --- a/library/Icinga/Web/Navigation/Navigation.php +++ b/library/Icinga/Web/Navigation/Navigation.php @@ -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()) diff --git a/library/Icinga/Web/Navigation/NavigationItem.php b/library/Icinga/Web/Navigation/NavigationItem.php index e262f5af0..8aaf7b888 100644 --- a/library/Icinga/Web/Navigation/NavigationItem.php +++ b/library/Icinga/Web/Navigation/NavigationItem.php @@ -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)) {