Skip to content

Commit 2fef871

Browse files
committed
[DoctrineBridge] Treat firstResult === 0 like null
1 parent 932520c commit 2fef871

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getEntities()
5050
*/
5151
public function getEntitiesByIds($identifier, array $values)
5252
{
53-
if (null !== $this->queryBuilder->getMaxResults() || null !== $this->queryBuilder->getFirstResult()) {
53+
if (null !== $this->queryBuilder->getMaxResults() || 0 < (int) $this->queryBuilder->getFirstResult()) {
5454
// an offset or a limit would apply on results including the where clause with submitted id values
5555
// that could make invalid choices valid
5656
$choices = [];

0 commit comments

Comments
 (0)