浏览代码

Merge remote branch 'maoueh/date_type_dead_code'

* maoueh/date_type_dead_code:
  [Form] Removed dead code in the buildForm method of DateType.php  * With the introduction of the getAllowedOptionValues mechanics, the check    is performed prior to the buildForm call. There is no more needs to check    it again in DateType.
Fabien Potencier 14 年之前
父节点
当前提交
43817de633
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      src/Symfony/Component/Form/Extension/Core/Type/DateType.php

+ 0 - 3
src/Symfony/Component/Form/Extension/Core/Type/DateType.php

@@ -14,7 +14,6 @@ namespace Symfony\Component\Form\Extension\Core\Type;
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\FormInterface;
 use Symfony\Component\Form\FormBuilder;
-use Symfony\Component\Form\Exception\FormException;
 use Symfony\Component\Form\Extension\Core\ChoiceList\PaddedChoiceList;
 use Symfony\Component\Form\Extension\Core\ChoiceList\MonthChoiceList;
 use Symfony\Component\Form\FormView;
@@ -80,8 +79,6 @@ class DateType extends AbstractType
             $builder->appendNormTransformer(new ReversedTransformer(
                 new DateTimeToArrayTransformer($options['data_timezone'], $options['data_timezone'], array('year', 'month', 'day'))
             ));
-        } else if ($options['input'] !== 'datetime') {
-            throw new FormException('The "input" option must be "datetime", "string", "timestamp" or "array".');
         }
 
         $builder