[Form] Fixed empty conversion of Intl types

This commit is contained in:
HeahDude 2017-01-31 22:42:05 +01:00
parent 77653d15ee
commit e43bfafbcc
5 changed files with 10 additions and 0 deletions

View File

@ -75,6 +75,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
public function loadChoicesForValues(array $values, $value = null)
{
// Optimize
$values = array_filter($values);
if (empty($values)) {
return array();
}
@ -93,6 +94,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
public function loadValuesForChoices(array $choices, $value = null)
{
// Optimize
$choices = array_filter($choices);
if (empty($choices)) {
return array();
}

View File

@ -75,6 +75,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
public function loadChoicesForValues(array $values, $value = null)
{
// Optimize
$values = array_filter($values);
if (empty($values)) {
return array();
}
@ -93,6 +94,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
public function loadValuesForChoices(array $choices, $value = null)
{
// Optimize
$choices = array_filter($choices);
if (empty($choices)) {
return array();
}

View File

@ -75,6 +75,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
public function loadChoicesForValues(array $values, $value = null)
{
// Optimize
$values = array_filter($values);
if (empty($values)) {
return array();
}
@ -93,6 +94,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
public function loadValuesForChoices(array $choices, $value = null)
{
// Optimize
$choices = array_filter($choices);
if (empty($choices)) {
return array();
}

View File

@ -75,6 +75,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
public function loadChoicesForValues(array $values, $value = null)
{
// Optimize
$values = array_filter($values);
if (empty($values)) {
return array();
}
@ -93,6 +94,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
public function loadValuesForChoices(array $choices, $value = null)
{
// Optimize
$choices = array_filter($choices);
if (empty($choices)) {
return array();
}

View File

@ -72,6 +72,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface
public function loadChoicesForValues(array $values, $value = null)
{
// Optimize
$values = array_filter($values);
if (empty($values)) {
return array();
}
@ -90,6 +91,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface
public function loadValuesForChoices(array $choices, $value = null)
{
// Optimize
$choices = array_filter($choices);
if (empty($choices)) {
return array();
}