Skip to content

Commit 71accb5

Browse files
Fix es7 total compatibility (#1)
1 parent e04d471 commit 71accb5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Result/AbstractResultsIterator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ public function __construct(
102102
$this->documents = $rawData['hits']['hits'];
103103
}
104104
if (isset($rawData['hits']['total'])) {
105-
$this->count = $rawData['hits']['total'];
105+
if (isset($rawData['hits']['total']['value'])) {
106+
$this->count = $rawData['hits']['total']['value'];
107+
} else {
108+
$this->count = $rawData['hits']['total'];
109+
}
106110
}
107111
}
108112

0 commit comments

Comments
 (0)