diff --git a/library/Director/CustomVariable/CustomVariable.php b/library/Director/CustomVariable/CustomVariable.php index d0a0a717..82d4bc6c 100644 --- a/library/Director/CustomVariable/CustomVariable.php +++ b/library/Director/CustomVariable/CustomVariable.php @@ -115,7 +115,7 @@ abstract class CustomVariable implements IcingaConfigRenderer protected function renderKeyName($key) { - if (preg_match('/^[a-z0-9_]+\d*$/i', $key)) { + if (preg_match('/^[a-z][a-z0-9_]*$/i', $key)) { return 'vars.' . c::escapeIfReserved($key); } else { return 'vars[' . c::renderString($key) . ']';