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
This commit is contained in:
Willi Wehmeier 2019-06-05 09:45:38 +02:00
parent 8eecdff01e
commit dfc82538ef

View file

@ -119,8 +119,10 @@ abstract class AbstractIndexer implements IndexerInterface
$offset = 0; $offset = 0;
$limit = $this->getLimit(); $limit = $this->getLimit();
while (($records = $this->getRecords($offset, $limit)) !== []) { while (($records = $this->getRecords($offset, $limit)) !== null) {
if ($records !== []) {
yield $records; yield $records;
}
$offset += $limit; $offset += $limit;
} }
} }