diff --git a/src/Builder/FormContractor.php b/src/Builder/FormContractor.php index 3a6788032..f81b9f03a 100644 --- a/src/Builder/FormContractor.php +++ b/src/Builder/FormContractor.php @@ -196,8 +196,12 @@ private function hasAssociation(FieldDescriptionInterface $fieldDescription): bo /** * @param string[] $classes */ - private function isAnyInstanceOf(string $type, array $classes): bool + private function isAnyInstanceOf(?string $type, array $classes): bool { + if (null === $type) { + return false; + } + foreach ($classes as $class) { if (is_a($type, $class, true)) { return true;