From 6cda6c4f06e860d9bf6be7608f0be8d66dd27231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mantas=20Jonu=C5=A1as?= <mantas.jonusas@nfq.lt> Date: Thu, 26 Mar 2015 15:15:33 +0200 Subject: [PATCH] More clarity for array checking --- Aggregation/Ipv4RangeAggregation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Aggregation/Ipv4RangeAggregation.php b/Aggregation/Ipv4RangeAggregation.php index 32d29cd..b8ac5bd 100644 --- a/Aggregation/Ipv4RangeAggregation.php +++ b/Aggregation/Ipv4RangeAggregation.php @@ -74,7 +74,7 @@ class Ipv4RangeAggregation extends AbstractAggregation */ public function getArray() { - if ($this->getField() && $this->ranges) { + if ($this->getField() && !empty($this->ranges)) { return [ 'field' => $this->getField(), 'ranges' => array_values($this->ranges), -- GitLab