Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16263fb

Browse files
committed
bug #21481 [Form] Fixed empty conversion of Intl types (HeahDude)
This PR was merged into the 3.2 branch. Discussion ---------- [Form] Fixed empty conversion of Intl types | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20759, #21475 | License | MIT | Doc PR | ~ Commits ------- e43bfaf [Form] Fixed empty conversion of Intl types
2 parents 77653d1 + e43bfaf commit 16263fb

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

src/Symfony/Component/Form/Extension/Core/Type/CountryType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function loadChoiceList($value = null)
7575
public function loadChoicesForValues(array $values, $value = null)
7676
{
7777
// Optimize
78+
$values = array_filter($values);
7879
if (empty($values)) {
7980
return array();
8081
}
@@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null)
9394
public function loadValuesForChoices(array $choices, $value = null)
9495
{
9596
// Optimize
97+
$choices = array_filter($choices);
9698
if (empty($choices)) {
9799
return array();
98100
}

src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function loadChoiceList($value = null)
7575
public function loadChoicesForValues(array $values, $value = null)
7676
{
7777
// Optimize
78+
$values = array_filter($values);
7879
if (empty($values)) {
7980
return array();
8081
}
@@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null)
9394
public function loadValuesForChoices(array $choices, $value = null)
9495
{
9596
// Optimize
97+
$choices = array_filter($choices);
9698
if (empty($choices)) {
9799
return array();
98100
}

src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function loadChoiceList($value = null)
7575
public function loadChoicesForValues(array $values, $value = null)
7676
{
7777
// Optimize
78+
$values = array_filter($values);
7879
if (empty($values)) {
7980
return array();
8081
}
@@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null)
9394
public function loadValuesForChoices(array $choices, $value = null)
9495
{
9596
// Optimize
97+
$choices = array_filter($choices);
9698
if (empty($choices)) {
9799
return array();
98100
}

src/Symfony/Component/Form/Extension/Core/Type/LocaleType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function loadChoiceList($value = null)
7575
public function loadChoicesForValues(array $values, $value = null)
7676
{
7777
// Optimize
78+
$values = array_filter($values);
7879
if (empty($values)) {
7980
return array();
8081
}
@@ -93,6 +94,7 @@ public function loadChoicesForValues(array $values, $value = null)
9394
public function loadValuesForChoices(array $choices, $value = null)
9495
{
9596
// Optimize
97+
$choices = array_filter($choices);
9698
if (empty($choices)) {
9799
return array();
98100
}

src/Symfony/Component/Form/Extension/Core/Type/TimezoneType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public function loadChoiceList($value = null)
7272
public function loadChoicesForValues(array $values, $value = null)
7373
{
7474
// Optimize
75+
$values = array_filter($values);
7576
if (empty($values)) {
7677
return array();
7778
}
@@ -90,6 +91,7 @@ public function loadChoicesForValues(array $values, $value = null)
9091
public function loadValuesForChoices(array $choices, $value = null)
9192
{
9293
// Optimize
94+
$choices = array_filter($choices);
9395
if (empty($choices)) {
9496
return array();
9597
}

0 commit comments

Comments
 (0)