mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
parent
235c7348f4
commit
ea3c3e0c3e
@ -241,16 +241,19 @@ Value MacroProcessor::InternalResolveMacros(const String& str, const ResolverLis
|
|||||||
if (recursive_macro) {
|
if (recursive_macro) {
|
||||||
if (resolved_macro.IsObjectType<Array>()) {
|
if (resolved_macro.IsObjectType<Array>()) {
|
||||||
Array::Ptr arr = resolved_macro;
|
Array::Ptr arr = resolved_macro;
|
||||||
Array::Ptr result = new Array();
|
Array::Ptr resolved_arr = new Array();
|
||||||
|
|
||||||
ObjectLock olock(arr);
|
ObjectLock olock(arr);
|
||||||
BOOST_FOREACH(Value& value, arr) {
|
BOOST_FOREACH(const Value& value, arr) {
|
||||||
result->Add(InternalResolveMacros(value,
|
if (value.IsScalar()) {
|
||||||
resolvers, cr, missingMacro, EscapeCallback(), Dictionary::Ptr(),
|
resolved_arr->Add(InternalResolveMacros(value,
|
||||||
false, recursionLevel + 1));
|
resolvers, cr, missingMacro, EscapeCallback(), Dictionary::Ptr(),
|
||||||
|
false, recursionLevel + 1));
|
||||||
|
} else
|
||||||
|
resolved_arr->Add(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolved_macro = result;
|
resolved_macro = resolved_arr;
|
||||||
} else
|
} else
|
||||||
resolved_macro = InternalResolveMacros(resolved_macro,
|
resolved_macro = InternalResolveMacros(resolved_macro,
|
||||||
resolvers, cr, missingMacro, EscapeCallback(), Dictionary::Ptr(),
|
resolvers, cr, missingMacro, EscapeCallback(), Dictionary::Ptr(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user