IcingaConfigHelper: add missing reserved keywords

fixes #1765
This commit is contained in:
Thomas Gelf 2019-01-23 10:24:56 +01:00
parent 6d46a62085
commit b9c5f94589
2 changed files with 14 additions and 2 deletions

View File

@ -13,7 +13,7 @@ before switching to a new version.
### User Interface ### User Interface
* FIX: restoring a basket fails when there is only one configured DB (#1716) * FIX: restoring a basket fails when there is only one configured DB (#1716)
* FIX: creating a new Basket with a "Custom Selection" failed with an error (#1733) * FIX: creating a new Basket with a "Custom Selection" failed with an error (#1733)
* FIX: some new reserved keywords are now escaped correctly (#1765)
1.6.0 1.6.0
----- -----

View File

@ -8,7 +8,7 @@ class IcingaConfigHelper
{ {
/** /**
* Reserved words according to * Reserved words according to
* https://docs.icinga.com/icinga2/snapshot/doc/module/icinga2/chapter/language-reference#reserved-keywords * https://icinga.com/docs/icinga2/latest/doc/17-language-reference/#reserved-keywords
*/ */
protected static $reservedWords = [ protected static $reservedWords = [
'object', 'object',
@ -38,6 +38,18 @@ class IcingaConfigHelper
'in', 'in',
'current_filename', 'current_filename',
'current_line', 'current_line',
'include_zones',
'globals',
'locals',
'default',
'break',
'continue',
'while',
'throw',
'try',
'except',
'using',
'namespace',
]; ];
public static function renderKeyValue($key, $value, $prefix = ' ') public static function renderKeyValue($key, $value, $prefix = ' ')