[Form] Fixed DateType default options

This commit is contained in:
William DURAND 2012-04-11 18:56:33 +02:00
parent 779d3bbb8e
commit 6f56dfc0d6

View File

@ -44,7 +44,7 @@ class DateType extends AbstractType
// If $format is not in the allowed options, it's considered as the pattern of the formatter if it is a string
if (!in_array($format, $allowedFormatOptionValues, true)) {
if (is_string($format)) {
$defaultOptions = array_merge($this->getDefaultOptions(), $options);
$defaultOptions = $this->getDefaultOptions();
$format = $defaultOptions['format'];
$pattern = $options['format'];