Преглед на файлове

[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.

Matthieu Vachon преди 14 години
родител
ревизия
87176e39d1
променени са 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