From 2f07e8b9545b4f1ec71034a491031c5afc3abfe5 Mon Sep 17 00:00:00 2001 From: Martynas Sudintas <martynas.sudintas@ongr.io> Date: Wed, 1 Apr 2015 13:51:20 +0300 Subject: [PATCH] AggregationsEndpoint is now using count() instead of empty() --- SearchEndpoint/AggregationsEndpoint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SearchEndpoint/AggregationsEndpoint.php b/SearchEndpoint/AggregationsEndpoint.php index 6418de3..c1c077f 100644 --- a/SearchEndpoint/AggregationsEndpoint.php +++ b/SearchEndpoint/AggregationsEndpoint.php @@ -40,7 +40,7 @@ class AggregationsEndpoint implements SearchEndpointInterface */ public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []) { - if (!empty($this->bag->all())) { + if (count($this->bag->all()) > 0) { return $this->bag->toArray(); } } -- GitLab