Skip to content

Commit 7b98243

Browse files
committed
[BUGFIX] Handle response in NodeIndexing flushing correctly
Incorrect escaping of the newline character used in the flush method in the NodeIndexing, resulting in incorrect log data if multiple response lines were returned.
1 parent 46a2bbc commit 7b98243

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer/NodeIndexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ public function flush() {
368368

369369
if ($content !== '') {
370370
$responseAsLines = $this->getIndex()->request('POST', '/_bulk', array(), $content)->getOriginalResponse()->getContent();
371-
foreach (explode('\n', $responseAsLines) as $responseLine) {
371+
foreach (explode("\n", $responseAsLines) as $responseLine) {
372372
$response = json_decode($responseLine);
373373
if (!is_object($response) || (isset($response->errors) && $response->errors !== FALSE)) {
374374
$this->logger->log('Indexing Error: ' . $responseLine, LOG_ERR);

0 commit comments

Comments
 (0)