Update src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
This commit is contained in:
parent
1656bf3dcf
commit
8ea1607991
|
@ -108,6 +108,8 @@ class DateTimeType extends AbstractType
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$options['error_bubbling'] = true;
|
||||||
|
|
||||||
// Only pass a subset of the options to children
|
// Only pass a subset of the options to children
|
||||||
$dateOptions = array_intersect_key($options, array_flip(array(
|
$dateOptions = array_intersect_key($options, array_flip(array(
|
||||||
'years',
|
'years',
|
||||||
|
@ -116,6 +118,7 @@ class DateTimeType extends AbstractType
|
||||||
'empty_value',
|
'empty_value',
|
||||||
'required',
|
'required',
|
||||||
'translation_domain',
|
'translation_domain',
|
||||||
|
'error_bubbling',
|
||||||
)));
|
)));
|
||||||
|
|
||||||
$timeOptions = array_intersect_key($options, array_flip(array(
|
$timeOptions = array_intersect_key($options, array_flip(array(
|
||||||
|
@ -126,6 +129,7 @@ class DateTimeType extends AbstractType
|
||||||
'empty_value',
|
'empty_value',
|
||||||
'required',
|
'required',
|
||||||
'translation_domain',
|
'translation_domain',
|
||||||
|
'error_bubbling',
|
||||||
)));
|
)));
|
||||||
|
|
||||||
if (null !== $options['date_widget']) {
|
if (null !== $options['date_widget']) {
|
||||||
|
@ -231,6 +235,7 @@ class DateTimeType extends AbstractType
|
||||||
// Don't modify \DateTime classes by reference, we treat
|
// Don't modify \DateTime classes by reference, we treat
|
||||||
// them like immutable value objects
|
// them like immutable value objects
|
||||||
'by_reference' => false,
|
'by_reference' => false,
|
||||||
|
'error_bubbling' => false,
|
||||||
// If initialized with a \DateTime object, FormType initializes
|
// If initialized with a \DateTime object, FormType initializes
|
||||||
// this option to "\DateTime". Since the internal, normalized
|
// this option to "\DateTime". Since the internal, normalized
|
||||||
// representation is not \DateTime, but an array, we need to unset
|
// representation is not \DateTime, but an array, we need to unset
|
||||||
|
|
Reference in New Issue