From 41bed29c80d82be6e47495585e59566b5d9f9419 Mon Sep 17 00:00:00 2001 From: Tony Malzhacker Date: Thu, 10 May 2012 15:46:21 +0200 Subject: [PATCH] [Form] fixed invalid 'type' option in ValidatorTypeGuesser for Date/TimeFields Field type guessing breaks, if you use any of the Date/Time constraints, since these field types have no 'type' default option defined. --- .../Form/Extension/Validator/ValidatorTypeGuesser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php index ef70b54ba6..1dc3be53fb 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php @@ -134,13 +134,13 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface case 'Symfony\Component\Validator\Constraints\Date': return new TypeGuess( 'date', - array('type' => 'string'), + array(), Guess::HIGH_CONFIDENCE ); case 'Symfony\Component\Validator\Constraints\DateTime': return new TypeGuess( 'datetime', - array('type' => 'string'), + array(), Guess::HIGH_CONFIDENCE ); case 'Symfony\Component\Validator\Constraints\Email': @@ -212,7 +212,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface case 'Symfony\Component\Validator\Constraints\Time': return new TypeGuess( 'time', - array('type' => 'string'), + array(), Guess::HIGH_CONFIDENCE ); case 'Symfony\Component\Validator\Constraints\Url':