Skip to content
Snippets Groups Projects
Commit 500c9984 authored by Aivaras Gotovskis's avatar Aivaras Gotovskis
Browse files

Fix malformed array if no order is set.

parent 4353d2eb
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,11 @@ class HistogramAggregation extends AbstractAggregation
*/
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