From f49a35fbfacf75e314034e749f6f6b4e3034f5fc 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..e0fed341f1c 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); }