From 7ba345eb19307f51c6ddeaf12ac98b70c3a10434 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Wed, 15 Jul 2020 11:35:33 +0200 Subject: [PATCH] Fix signature --- src/Builder/FormContractor.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;