From: Gunnar Beutner Date: Thu, 26 Mar 2015 08:29:52 +0000 (+0100) Subject: Fix arrays in command arguments X-Git-Tag: v2.3.3~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47e17bfe895cd4f5632091a2752f58762cd8bbb0;p=icinga2 Fix arrays in command arguments fixes #8869 --- diff --git a/lib/icinga/macroprocessor.cpp b/lib/icinga/macroprocessor.cpp index 77a3aeafc..625a4169e 100644 --- a/lib/icinga/macroprocessor.cpp +++ b/lib/icinga/macroprocessor.cpp @@ -54,8 +54,13 @@ Value MacroProcessor::ResolveMacros(const Value& str, const ResolverList& resolv BOOST_FOREACH(const Value& arg, arr) { /* Note: don't escape macros here. */ - resultArr->Add(InternalResolveMacros(arg, resolvers, cr, missingMacro, - EscapeCallback(), resolvedMacros, useResolvedMacros)); + Value value = InternalResolveMacros(arg, resolvers, cr, missingMacro, + EscapeCallback(), resolvedMacros, useResolvedMacros); + + if (value.IsObjectType()) + resultArr->Add(Utility::Join(value, ';')); + else + resultArr->Add(value); } result = resultArr;