From 0430178fe28b90276c49a609d2b9e4233380fabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sun, 24 Sep 2023 15:42:44 +0200 Subject: [PATCH] Fixed issue when the data is null. --- src/Form/Type/StructuralEntityType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form/Type/StructuralEntityType.php b/src/Form/Type/StructuralEntityType.php index 7eafccd9..236288aa 100644 --- a/src/Form/Type/StructuralEntityType.php +++ b/src/Form/Type/StructuralEntityType.php @@ -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 {