From feeb2e4a53637f8f7c3f011729936c821a18cffe Mon Sep 17 00:00:00 2001 From: Mikel Martin Date: Wed, 9 Oct 2024 10:27:35 +0200 Subject: [PATCH] Fix warning array_slice null param #2 --- .../Common/TestComponents/ORM/MemoryRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Infrastructure/Common/TestComponents/ORM/MemoryRepository.php b/tests/Infrastructure/Common/TestComponents/ORM/MemoryRepository.php index 176189d..17a0415 100644 --- a/tests/Infrastructure/Common/TestComponents/ORM/MemoryRepository.php +++ b/tests/Infrastructure/Common/TestComponents/ORM/MemoryRepository.php @@ -335,7 +335,7 @@ function ($first, $second) use ($i, $indexKey) { private function sliceResults(QueryFilter $filter, array $result) { if ($filter->getLimit()) { - $result = array_slice($result, $filter->getOffset(), $filter->getLimit()); + $result = array_slice($result, $filter->getOffset()??0, $filter->getLimit()); } return $result;