From dfc82538efbf7dee1761d1c4bcd908e7bfe32309 Mon Sep 17 00:00:00 2001 From: Willi Wehmeier Date: Wed, 5 Jun 2019 09:45:38 +0200 Subject: [PATCH] BUGFIX: Dont stop loop on empty array If the fetched record batch gets emptied because of the rootline filter the loop gets interrupted and lasting records may get skipped from further processing --- Classes/Domain/Index/AbstractIndexer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Classes/Domain/Index/AbstractIndexer.php b/Classes/Domain/Index/AbstractIndexer.php index b22c011..0fccfe0 100644 --- a/Classes/Domain/Index/AbstractIndexer.php +++ b/Classes/Domain/Index/AbstractIndexer.php @@ -119,8 +119,10 @@ abstract class AbstractIndexer implements IndexerInterface $offset = 0; $limit = $this->getLimit(); - while (($records = $this->getRecords($offset, $limit)) !== []) { - yield $records; + while (($records = $this->getRecords($offset, $limit)) !== null) { + if ($records !== []) { + yield $records; + } $offset += $limit; } }