FormLoader: Define var $file in method scope

- Fixes IDE's message: `varibale $file is probabaly undefined`
This commit is contained in:
Sukhwinder Dhillon 2023-08-14 12:31:42 +02:00
parent 95776d309b
commit 95504131d1

View file

@ -17,6 +17,8 @@ class FormLoader
$basedir = $module->getFormDir();
$ns = '\\Icinga\\Module\\' . ucfirst($module->getName()) . '\\Forms\\';
}
$file = null;
if (preg_match('~^[a-z0-9/]+$~i', $name)) {
$parts = preg_split('~/~', $name);
$class = ucfirst(array_pop($parts)) . 'Form';