fix bug with PostalCode ChoiceLoader form

error: must be an instance of Chill\MainBundle\Entity\PostalCode, null given
only with: APP_DEV=prod
This commit is contained in:
Tchama 2020-08-25 15:37:06 +02:00
parent 455e1f21c4
commit 14d32aa763

View File

@ -47,7 +47,7 @@ class PostalCodeChoiceLoader implements ChoiceLoaderInterface
{
$list = new \Symfony\Component\Form\ChoiceList\ArrayChoiceList(
$this->lazyLoadedPostalCodes,
function(PostalCode $pc) use ($value) {
function(PostalCode $pc = null) use ($value) {
return \call_user_func($value, $pc);
});