8000 [Form] Fixed empty conversion of Intl types · symfony/symfony@e43bfaf · GitHub
[go: up one dir, main page]

Skip to content

Commit e43bfaf

Browse files
committed
[Form] Fixed empty conversion of Intl types
1 parent 77653d1 commit e43bfaf

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
}
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)
0