소스 검색

Fixed a bug when multiple expanded choices would render unchecked because of the Form Framework's strict type checking.

Elnur Abdurrakhimov 13 년 전
부모
커밋
6bd1749553
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/Symfony/Bridge/Doctrine/Form/DataTransformer/EntitiesToArrayTransformer.php

+ 2 - 1
src/Symfony/Bridge/Doctrine/Form/DataTransformer/EntitiesToArrayTransformer.php

@@ -57,7 +57,8 @@ class EntitiesToArrayTransformer implements DataTransformerInterface
             }
         } else {
             foreach ($collection as $entity) {
-                $array[] = current($this->choiceList->getIdentifierValues($entity));
+                $value = current($this->choiceList->getIdentifierValues($entity));
+                $array[] = is_numeric($value) ? (int) $value : $value;
             }
         }