fix(legacy): check empty before iteration on files
This commit is contained in:
parent
5e8f7d430f
commit
bcaea16c19
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue