[BUGFIX] Make sure the while loop is not closed when filterRecordsByRootLineBlacklist() returns no results

This commit is contained in:
Benjamin Serfhos 2018-10-22 17:28:49 +02:00
parent 7566bf93d5
commit 3f5273f0fe

View file

@ -149,8 +149,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 (!empty($records)) {
yield $records;
}
$offset += $limit;
}
}