From 14d32aa763cbd7e31f37cc0880eb28130c88a715 Mon Sep 17 00:00:00 2001 From: Tchama Date: Tue, 25 Aug 2020 15:37:06 +0200 Subject: [PATCH] fix bug with PostalCode ChoiceLoader form error: must be an instance of Chill\MainBundle\Entity\PostalCode, null given only with: APP_DEV=prod --- Form/ChoiceLoader/PostalCodeChoiceLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Form/ChoiceLoader/PostalCodeChoiceLoader.php b/Form/ChoiceLoader/PostalCodeChoiceLoader.php index 4b52ba38c..027c05e4a 100644 --- a/Form/ChoiceLoader/PostalCodeChoiceLoader.php +++ b/Form/ChoiceLoader/PostalCodeChoiceLoader.php @@ -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); });