[Form] Fixed empty conversion of Intl types
This commit is contained in:
parent
77653d15ee
commit
e43bfafbcc
@ -75,6 +75,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadChoicesForValues(array $values, $value = null)
|
public function loadChoicesForValues(array $values, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$values = array_filter($values);
|
||||||
if (empty($values)) {
|
if (empty($values)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@ -93,6 +94,7 @@ class CountryType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadValuesForChoices(array $choices, $value = null)
|
public function loadValuesForChoices(array $choices, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$choices = array_filter($choices);
|
||||||
if (empty($choices)) {
|
if (empty($choices)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadChoicesForValues(array $values, $value = null)
|
public function loadChoicesForValues(array $values, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$values = array_filter($values);
|
||||||
if (empty($values)) {
|
if (empty($values)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@ -93,6 +94,7 @@ class CurrencyType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadValuesForChoices(array $choices, $value = null)
|
public function loadValuesForChoices(array $choices, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$choices = array_filter($choices);
|
||||||
if (empty($choices)) {
|
if (empty($choices)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadChoicesForValues(array $values, $value = null)
|
public function loadChoicesForValues(array $values, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$values = array_filter($values);
|
||||||
if (empty($values)) {
|
if (empty($values)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@ -93,6 +94,7 @@ class LanguageType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadValuesForChoices(array $choices, $value = null)
|
public function loadValuesForChoices(array $choices, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$choices = array_filter($choices);
|
||||||
if (empty($choices)) {
|
if (empty($choices)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadChoicesForValues(array $values, $value = null)
|
public function loadChoicesForValues(array $values, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$values = array_filter($values);
|
||||||
if (empty($values)) {
|
if (empty($values)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@ -93,6 +94,7 @@ class LocaleType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadValuesForChoices(array $choices, $value = null)
|
public function loadValuesForChoices(array $choices, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$choices = array_filter($choices);
|
||||||
if (empty($choices)) {
|
if (empty($choices)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadChoicesForValues(array $values, $value = null)
|
public function loadChoicesForValues(array $values, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$values = array_filter($values);
|
||||||
if (empty($values)) {
|
if (empty($values)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
@ -90,6 +91,7 @@ class TimezoneType extends AbstractType implements ChoiceLoaderInterface
|
|||||||
public function loadValuesForChoices(array $choices, $value = null)
|
public function loadValuesForChoices(array $choices, $value = null)
|
||||||
{
|
{
|
||||||
// Optimize
|
// Optimize
|
||||||
|
$choices = array_filter($choices);
|
||||||
if (empty($choices)) {
|
if (empty($choices)) {
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user