mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
add option 'null_if_empty' on AddressType
This commit is contained in:
@@ -59,7 +59,11 @@ class PostalCodeChoiceLoader implements ChoiceLoaderInterface
|
||||
$choices = [];
|
||||
|
||||
foreach($values as $value) {
|
||||
$choices[] = $this->postalCodeRepository->find($value);
|
||||
if (empty($value)) {
|
||||
$choices[] = null;
|
||||
} else {
|
||||
$choices[] = $this->postalCodeRepository->find($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $choices;
|
||||
|
Reference in New Issue
Block a user