Skip to content

Commit 1c4fc42

Browse files
committed
Merge branch '2.3' into 2.6
Conflicts: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/request.html.twig src/Symfony/Component/PropertyAccess/PropertyAccessor.php src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php src/Symfony/Component/Validator/Tests/Mapping/Loader/XmlFileLoaderTest.php
2 parents 16bfb0a + c8ea8cd commit 1c4fc42

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Form/ChoiceList/EntityChoiceList.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,10 @@ public function getChoicesForValues(array $values)
218218
if (!$this->loaded) {
219219
// Optimize performance in case we have an entity loader and
220220
// a single-field identifier
221-
if ($this->idAsValue && $this->entityLoader) {
222-
$unorderedEntities = $this->entityLoader->getEntitiesByIds($this->idField, $values);
221+
if ($this->idAsValue) {
222+
$unorderedEntities = $this->entityLoader
223+
? $this->entityLoader->getEntitiesByIds($this->idField, $values)
224+
: $this->em->getRepository($this->class)->findBy(array($this->idField => $values));
223225
$entitiesByValue = array();
224226
$entities = array();
225227

0 commit comments

Comments
 (0)