Skip to content

Commit

Permalink
Fixes broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
quintenbuis committed Sep 21, 2023
1 parent d8a50f8 commit 7ff0225
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Application/Results.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public function aggregations(): array
foreach ($this->rawResults['aggregations'] as $name => $rawAggregation) {
if (array_key_exists('doc_count', $rawAggregation)) {
foreach ($rawAggregation as $nestedAggregationName => $rawNestedAggregation) {
$aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets'] ?? $rawNestedAggregation);
if (isset($rawNestedAggregation['buckets'])) {
$aggregations[] = new AggregationResult($nestedAggregationName, $rawNestedAggregation['buckets'] ?? $rawNestedAggregation);
}
}
continue;
}
Expand Down

0 comments on commit 7ff0225

Please sign in to comment.