From 43a571e013ec70c453a8f6a1cad0d1b9cc283fbc Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Thu, 11 Oct 2018 12:42:56 +0200 Subject: [PATCH] Don't throw an error when namespace indexers don't find a valid key Examples: ``` globals["abc"] globals.def ``` The patch for the Icinga Director unfortunately only solves the master, and as discussed with @lippserd we need to ensure that satellites and clients with 2.10 can be restarted without any errors from deployed configuration. refs #6509 refs icinga/icingaweb2-module-director#1654 --- lib/base/namespace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/namespace.cpp b/lib/base/namespace.cpp index d106a0ee3..909a76511 100644 --- a/lib/base/namespace.cpp +++ b/lib/base/namespace.cpp @@ -108,7 +108,7 @@ Value Namespace::GetFieldByName(const String& field, bool, const DebugInfo& debu if (nsVal) return nsVal->Get(debugInfo); else - return GetPrototypeField(const_cast(this), field, true, debugInfo); + return GetPrototypeField(const_cast(this), field, false, debugInfo); /* Ignore indexer not found errors similar to the Dictionary class. */ } void Namespace::SetFieldByName(const String& field, const Value& value, bool overrideFrozen, const DebugInfo& debugInfo) -- 2.40.0