[BaseCollection] Fix incorrectly working limit() method

This commit is contained in:
Meritoo
2021-04-11 21:45:29 +02:00
parent 0d3265d7b6
commit 1eb86cf102
4 changed files with 12 additions and 17 deletions

View File

@@ -248,7 +248,7 @@ abstract class BaseCollection implements CollectionInterface
foreach ($result as $index => $element) {
$iteration++;
if ($iteration < $offset || ($iteration >= $offset && $iteration < $max)) {
if ($iteration >= $offset && $iteration < $offset + $max) {
continue;
}