diff --git a/build/gen_stub.php b/build/gen_stub.php index 1fff123d84c..0ab8ca26adf 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -272,7 +272,7 @@ class SimpleType { } $matches = []; - $isArray = preg_match("/array\s*<\s*([A-Za-z0-9_-|]+)?(\s*,\s*)?([A-Za-z0-9_-|]+)?\s*>/i", $typeString, $matches); + $isArray = preg_match("/array\s*<\s*([A-Za-z0-9_|-]+)?(\s*,\s*)?([A-Za-z0-9_|-]+)?\s*>/i", $typeString, $matches); if ($isArray) { if (empty($matches[1]) || empty($matches[3])) { throw new Exception("array<> type hint must have both a key and a value");