Skip to content

Commit e1e1db4

Browse files
committed
Merge pull request #43 from networkteam/php53-compatible
[BUGFIX] Make PHP 5.3 compatible
2 parents 3fe0f45 + e685f90 commit e1e1db4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ public function execute() {
316316
$response = $this->elasticSearchClient->getIndex()->request('GET', '/_search', array(), json_encode($this->request));
317317
$timeAfterwards = microtime(TRUE);
318318

319-
$hits = $response->getTreatedContent()['hits'];
319+
$treatedContent = $response->getTreatedContent();
320+
$hits = $treatedContent['hits'];
320321

321322
if ($this->logThisQuery === TRUE) {
322323
$this->logger->log('Query Log (' . $this->logMessage . '): ' . json_encode($this->request) . ' -- execution time: ' . (($timeAfterwards-$timeBefore)*1000) . ' ms -- Limit: ' . $this->limit . ' -- Number of results returned: ' . count($hits['hits']) . ' -- Total Results: ' . $hits['total'], LOG_DEBUG);
@@ -376,7 +377,8 @@ public function count() {
376377
$response = $this->elasticSearchClient->getIndex()->request('GET', '/_count', array(), json_encode($this->request));
377378
$timeAfterwards = microtime(TRUE);
378379

379-
$count = $response->getTreatedContent()['count'];
380+
$treatedContent = $response->getTreatedContent();
381+
$count = $treatedContent['count'];
380382

381383
if ($this->logThisQuery === TRUE) {
382384
$this->logger->log('Query Log (' . $this->logMessage . '): ' . json_encode($this->request) . ' -- execution time: ' . (($timeAfterwards-$timeBefore)*1000) . ' ms -- Total Results: ' . $count, LOG_DEBUG);

0 commit comments

Comments
 (0)