Skip to content

Commit

Permalink
MAKAIRA-4465 remove null and empty string values from the request agg…
Browse files Browse the repository at this point in the history
…regation
  • Loading branch information
duongnfq841992 committed May 21, 2024
1 parent a8ba43b commit ab689e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ public function verify()
*/
public function sanitize()
{
// This was commented out because array filter will also remove 0, and we do not want this
// $this->aggregations = array_filter($this->aggregations);
$this->aggregations = array_filter($this->aggregations, static function ($value) {
return $value !== null && $value !== '';
});

return $this;
}
Expand Down

0 comments on commit ab689e5

Please sign in to comment.