From c27329820e7508d621d5c2e03005bb279d5fa612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 29 Aug 2018 23:49:41 +0200 Subject: [PATCH] fix error in loader person --- Form/ChoiceLoader/PersonChoiceLoader.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Form/ChoiceLoader/PersonChoiceLoader.php b/Form/ChoiceLoader/PersonChoiceLoader.php index 1c2ea9897..4ec41e7b5 100644 --- a/Form/ChoiceLoader/PersonChoiceLoader.php +++ b/Form/ChoiceLoader/PersonChoiceLoader.php @@ -71,6 +71,10 @@ class PersonChoiceLoader implements ChoiceLoaderInterface $choices = []; foreach($values as $value) { + if (empty($value)) { + continue; + } + $person = $this->personRepository->find($value); if ($this->hasCenterFilter() && @@ -85,7 +89,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface } public function loadValuesForChoices(array $choices, $value = null) - { + {dump($choices); $values = []; foreach ($choices as $choice) {