Skip to content

Commit 2405be7

Browse files
committed
Fixed check for first array element
1 parent 63e0c65 commit 2405be7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Repository/AbstractRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public function searchOne(array $criteria, string $sort = null)
323323
return null;
324324
}
325325

326-
return $items->getCurrentPageResults()[0];
326+
return $items->getCurrentPageResults()[0] ?? null;
327327
}
328328

329329
/**

0 commit comments

Comments
 (0)