From 03f19b01185fe4177af1511feeca1c853ad17335 Mon Sep 17 00:00:00 2001 From: Kevin Kaniaburka Date: Tue, 9 Jul 2024 09:10:57 +0200 Subject: [PATCH] Fix FacetsResolver with no buckets --- src/Api/Resolver/FacetsResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api/Resolver/FacetsResolver.php b/src/Api/Resolver/FacetsResolver.php index da9bc7d3..abb87c69 100644 --- a/src/Api/Resolver/FacetsResolver.php +++ b/src/Api/Resolver/FacetsResolver.php @@ -48,7 +48,7 @@ public function resolve(array $data): array } return array_filter($adapter->getAggregations(), function ($facet) { - return [] !== $facet['buckets'] ?? []; + return [] !== ($facet['buckets'] ?? []); }); } }