diff --git a/SearchEndpoint/AggregationsEndpoint.php b/SearchEndpoint/AggregationsEndpoint.php index 6418de39397706e79afe79fbd32d4da1321a8e68..c1c077fbe052b1f926aee766a94ac4016afdf69a 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(); } }