From 37482dd0e0329bdf5b47cfc7f58fa9819c15d813 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 21 Dec 2022 10:09:11 +0100 Subject: [PATCH] fix php <=7.3 --- src/Type/UnionTypeHelper.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Type/UnionTypeHelper.php b/src/Type/UnionTypeHelper.php index 7f8936899e8..28ec01b74a2 100644 --- a/src/Type/UnionTypeHelper.php +++ b/src/Type/UnionTypeHelper.php @@ -70,6 +70,10 @@ public static function getConstantStrings(array $types): array $strings[] = $type->getConstantStrings(); } + if ($strings === []) { + return []; + } + return array_merge(...$strings); }