Skip to content

Commit

Permalink
Merge 133ee57 into cd67eeb
Browse files Browse the repository at this point in the history
  • Loading branch information
malueck committed May 30, 2016
2 parents cd67eeb + 133ee57 commit 9deec52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Form/Type/FormatterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$options['format_field_options']['property_path'] = $formatField;
}

$options['format_field_options']['data'] = $this->pool->getDefaultFormatter();
if (!array_key_exists('data', $options['format_field_options']) ||
!array_key_exists($options['format_field_options']['data'], $this->pool->getFormatters())) {
$options['format_field_options']['data'] = $this->pool->getDefaultFormatter();
}

if (is_array($options['source_field'])) {
list($sourceField, $sourcePropertyPath) = $options['source_field'];
Expand Down

0 comments on commit 9deec52

Please sign in to comment.