Skip to content

Commit

Permalink
Se previene error en campos personalizados de tipo selección sin valo…
Browse files Browse the repository at this point in the history
…res.
  • Loading branch information
jogianotti committed Oct 7, 2020
1 parent 4b2be19 commit b808b2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function postSetData(FormEvent $event): void
}

if (ChoiceType::class === $field->getType()) {
$values = explode(',', $field->getValue());
$values = $field->getValue() ? explode(',', $field->getValue()) : [];
$array_choices = ['' => ''];
foreach ($values as $key => $val) {
$array_choices[$val] = $val;
Expand Down

0 comments on commit b808b2d

Please sign in to comment.