Skip to content

Commit e0080dd

Browse files
committed
[!!!][BUGFIX] Correct the return value for getFirst()
This change fixes the return value for getFirst() according to the api to the first object instead of an sliced array. After this change not an array but a single node will be returned.
1 parent 888c962 commit e0080dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Eel/ElasticSearchQueryResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function getFirst()
151151
{
152152
$this->initialize();
153153
if (count($this->nodes) > 0) {
154-
return array_slice($this->nodes, 0, 1);
154+
return array_values($this->nodes)[0];
155155
}
156156
}
157157

0 commit comments

Comments
 (0)