Fixed issue when the data is null.

This commit is contained in:
Jan Böhmer 2023-09-24 15:42:44 +02:00
parent cf9df883c9
commit 0430178fe2

View file

@ -55,7 +55,7 @@ class StructuralEntityType extends AbstractType
//In that case we add the new element to our choice_loader
$data = $event->getData();
if (str_starts_with($data, '$%$')) {
if (is_string($data) && str_starts_with($data, '$%$')) {
//Extract the real name from the data
$data = substr($data, 3);
} else {