fix(legacy): check empty before iteration on files

This commit is contained in:
jo 2022-07-07 19:08:09 +02:00 committed by Kyle Robbertze
parent 5e8f7d430f
commit bcaea16c19
1 changed files with 4 additions and 0 deletions

View File

@ -1343,6 +1343,10 @@ SQL;
$totalTime = 0;
$totalItems = 0;
if ($files->isEmpty()) {
return $insertList;
}
// this moves the pointer to the first element in the collection
$files->getFirst();
$iterator = $files->getIterator();