8000 [DoctrineBridge] Bypass the db when no valid identifier is provided i… · symfony/symfony@96e63fd · GitHub
[go: up one dir, main page]

Skip to content

Commit 96e63fd

Browse files
[DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader
1 parent 45579fd commit 96e63fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public function getEntitiesByIds($identifier, array $values)
9292
$values = array_values(array_filter($values, function ($v) {
9393
return (string) $v === (string) (int) $v;
9494
}));
95+
if (!$values) {
96+
return array();
97+
}
9598
} else {
9699
$parameterType = Connection::PARAM_STR_ARRAY;
97100
}

0 commit comments

Comments
 (0)
0