From 5da36490c86c7b651ccd41f1a166766acde01c6b Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 23 Mar 2016 02:23:21 +0100 Subject: [PATCH] ExtensibleSet: do not render empty arrays --- library/Director/IcingaConfig/ExtensibleSet.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/Director/IcingaConfig/ExtensibleSet.php b/library/Director/IcingaConfig/ExtensibleSet.php index 27eb7564..a84535ec 100644 --- a/library/Director/IcingaConfig/ExtensibleSet.php +++ b/library/Director/IcingaConfig/ExtensibleSet.php @@ -395,7 +395,10 @@ class ExtensibleSet { $parts = array(); - if ($this->ownValues !== null) { + // TODO: It would be nice if we could use empty arrays to override + // inherited ones + // if ($this->ownValues !== null) { + if (!empty($this->ownValues)) { $parts[] = c::renderKeyValue( $key, $this->renderArray($this->ownValues), @@ -403,7 +406,7 @@ class ExtensibleSet ); } - if (! empty($this->plusValues)) { + if (!empty($this->plusValues)) { $parts[] = c::renderKeyOperatorValue( $key, '+=', @@ -412,7 +415,7 @@ class ExtensibleSet ); } - if (! empty($this->minusValues)) { + if (!empty($this->minusValues)) { $parts[] = c::renderKeyOperatorValue( $key, '-=',