From: Gunnar Beutner Date: Sat, 10 May 2014 08:46:49 +0000 (+0200) Subject: Implement support for arrays for the indexer operator. X-Git-Tag: v0.0.11~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab8624d2f51452f8058bf07c2732c5ce12f9eec2;p=icinga2 Implement support for arrays for the indexer operator. Fixes #6182 --- diff --git a/lib/config/aexpression.cpp b/lib/config/aexpression.cpp index 01d19b17b..bd4f0ef2f 100644 --- a/lib/config/aexpression.cpp +++ b/lib/config/aexpression.cpp @@ -437,6 +437,9 @@ Value AExpression::OpIndexer(const AExpression *expr, const Dictionary::Ptr& loc if (value.IsObjectType()) { Dictionary::Ptr dict = value; return dict->Get(index); + } else if (value.IsObjectType()) { + Array::Ptr arr = value; + return arr->Get(index); } else if (value.IsObjectType()) { Object::Ptr object = value; const Type *type = object->GetReflectionType();