[DoctrineBundle] Form transformers shouldn't explode if they're passed null as a value
This commit is contained in:
parent
0bdb271608
commit
b8987e1bde
@ -138,6 +138,10 @@ class CollectionToStringTransformer extends BaseValueTransformer
|
||||
*/
|
||||
public function transform($value)
|
||||
{
|
||||
if (null === $value) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$values = array();
|
||||
$em = $this->getOption('em');
|
||||
$reflField = $em->getClassMetadata($this->getOption('class_name'))
|
||||
|
Reference in New Issue
Block a user