Skip to content
Snippets Groups Projects
Commit 8edbd1e7 authored by Simonas Šerlinskas's avatar Simonas Šerlinskas
Browse files

Merge pull request #16 from GrandLTU/HistogramAggregation-order-fix

Fix malformed array if no order is set.
parents f6ddf592 500c9984
No related branches found
No related tags found
No related merge requests found
...@@ -122,7 +122,11 @@ class HistogramAggregation extends AbstractAggregation ...@@ -122,7 +122,11 @@ class HistogramAggregation extends AbstractAggregation
*/ */
public function getOrder() public function getOrder()
{ {
return [$this->orderMode => $this->orderDirection]; if ($this->orderMode && $this->orderDirection) {
return [$this->orderMode => $this->orderDirection];
} else {
return null;
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment