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

changed empty array to std class for particular queries

parent 581a639e
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,6 @@ class GlobalAggregation extends AbstractAggregation
*/
public function getArray()
{
return [];
return new \stdClass();
}
}
......@@ -75,11 +75,11 @@ class ReverseNestedAggregation extends AbstractAggregation
throw new \LogicException("Reverse Nested aggregation `{$this->getName()}` has no aggregations added");
}
$data = [];
$output = new \stdClass();
if ($this->getPath()) {
$data['path'] = $this->getPath();
$output['path'] = $this->getPath();
}
return $data;
return $output;
}
}
......@@ -138,6 +138,6 @@ class TopHitsAggregation extends AbstractAggregation
$output = $this->processArray($output);
return $output;
return empty($output) ? new \stdClass() : $output;
}
}
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