Skip to content

Commit

Permalink
Merge pull request #391 from doctrine/2.1.x
Browse files Browse the repository at this point in the history
Merge 2.1.x up into 2.2.x
  • Loading branch information
greg0ire authored Feb 17, 2024
2 parents bdba62b + 36bf824 commit 0798e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ArrayCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ public function matching(Criteria $criteria)
$offset = $criteria->getFirstResult();
$length = $criteria->getMaxResults();

if ($offset || $length) {
if ($offset !== null && $offset > 0 || $length !== null && $length > 0) {
$filtered = array_slice($filtered, (int) $offset, $length, true);
}

Expand Down

0 comments on commit 0798e51

Please sign in to comment.