From 7bc07c4368c539727c41d215150b27789297ff6e Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Mon, 20 Apr 2015 13:21:37 +0200 Subject: [PATCH] Force absolute nampesace for module menu item renderer refs #7642 --- library/Icinga/Web/Menu.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Menu.php b/library/Icinga/Web/Menu.php index 056e2ff88..bca1e17d1 100644 --- a/library/Icinga/Web/Menu.php +++ b/library/Icinga/Web/Menu.php @@ -117,10 +117,11 @@ class Menu implements RecursiveIterator foreach ($props as $key => $value) { $method = 'set' . implode('', array_map('ucfirst', explode('_', strtolower($key)))); if ($key === 'renderer') { + $value = '\\' . ltrim($value, '\\'); if (class_exists($value)) { $value = new $value; } else { - $class = '\Icinga\Web\Menu\\' . $value; + $class = '\Icinga\Web\Menu' . $value; if (!class_exists($class)) { throw new ConfigurationError( sprintf('ItemRenderer with class "%s" does not exist', $class)