Skip to content

Commit

Permalink
explode(): Passing null to parameter #2 ($string) of type string is d…
Browse files Browse the repository at this point in the history
…eprecated
  • Loading branch information
escopecz committed Jun 9, 2023
1 parent eeb48e2 commit d6f8128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bundles/LeadBundle/Form/Type/FieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'required' => false,
'choices' => array_flip($list),
'multiple' => 'multiselect' === $type,
'data' => 'multiselect' === $type ? explode('|', $options['data']->getDefaultValue()) : $options['data']->getDefaultValue(),
'data' => 'multiselect' === $type && is_string($options['data']->getDefaultValue()) ? explode('|', $options['data']->getDefaultValue()) : $options['data']->getDefaultValue(),
'disabled' => $disableDefaultValue,
]
);
Expand Down

0 comments on commit d6f8128

Please sign in to comment.