From 47e17bfe895cd4f5632091a2752f58762cd8bbb0 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 26 Mar 2015 09:29:52 +0100 Subject: [PATCH] Fix arrays in command arguments fixes #8869 --- lib/icinga/macroprocessor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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;