diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php b/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php index 036946d56b3fd..a96a42d3d6b67 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CountryType.php @@ -75,6 +75,7 @@ public function loadChoiceList($value = null) public function loadChoicesForValues(array $values, $value = null) { // Optimize + $values = array_filter($values); if (empty($values)) { return array(); } @@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null) public function loadValuesForChoices(array $choices, $value = null) { // Optimize + $choices = array_filter($choices); if (empty($choices)) { return array(); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php b/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php index 5edc2983044a0..9970d03ad7195 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php @@ -75,6 +75,7 @@ public function loadChoiceList($value = null) public function loadChoicesForValues(array $values, $value = null) { // Optimize + $values = array_filter($values); if (empty($values)) { return array(); } @@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null) public function loadValuesForChoices(array $choices, $value = null) { // Optimize + $choices = array_filter($choices); if (empty($choices)) { return array(); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php b/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php index c77d6d0416105..279402a3e28e3 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php @@ -75,6 +75,7 @@ public function loadChoiceList($value = null) public function loadChoicesForValues(array $values, $value = null) { // Optimize + $values = array_filter($values); if (empty($values)) { return array(); } @@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null) public function loadValuesForChoices(array $choices, $value = null) { // Optimize + $choices = array_filter($choices); if (empty($choices)) { return array(); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php b/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php index 44e362f0f7629..de795956b77a1 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php @@ -75,6 +75,7 @@ public function loadChoiceList($value = null) public function loadChoicesForValues(array $values, $value = null) { // Optimize + $values = array_filter($values); if (empty($values)) { return array(); } @@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null) public function loadValuesForChoices(array $choices, $value = null) { // Optimize + $choices = array_filter($choices); if (empty($choices)) { return array(); } diff --git a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php index aaa5bd1c6e31f..fbfce90ba50bb 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php @@ -72,6 +72,7 @@ public function loadChoiceList($value = null) public function loadChoicesForValues(array $values, $value = null) { // Optimize + $values = array_filter($values); if (empty($values)) { return array(); } @@ -90,6 +91,7 @@ public function loadChoicesForValues(array $values, $value = null) public function loadValuesForChoices(array $choices, $value = null) { // Optimize + $choices = array_filter($choices); if (empty($choices)) { return array(); }