diff --git a/library/Director/IcingaConfig/IcingaConfigHelper.php b/library/Director/IcingaConfig/IcingaConfigHelper.php index 105e24ff5..26adb17a2 100644 --- a/library/Director/IcingaConfig/IcingaConfigHelper.php +++ b/library/Director/IcingaConfig/IcingaConfigHelper.php @@ -405,7 +405,9 @@ public static function renderStringWithVariables($string, array $whiteList = nul if ($whiteList !== null || $matchRegex) { foreach ($whiteList as $entry) { $pattern = "/^(" . $entry . "|" . $entry . "\..*)$/i"; - $whiteListMatch = preg_match($pattern, $macroName); + if (preg_match($pattern, $macroName)) { + $whiteListMatch = true; + } } // Otherwise simply match against array entries } elseif ($whiteList !== null) {