Skip to content

Commit ea7fa87

Browse files
minor #449 Fix return type for Locale::parseLocale - it can return null (andrew-demb)
This PR was merged into the 1.x branch. Discussion ---------- Fix return type for `Locale::parseLocale` - it can return `null` https://www.php.net/manual/en/locale.parselocale.php > Returns null when the length of locale exceeds INTL_MAX_LOCALE_LEN. ---- > Recreated PR from symfony/polyfill-intl-icu#1 Commits ------- 1e1899c Fix return type for `Locale::parseLocale` - it can return `null`
2 parents fec6af6 + 1e1899c commit ea7fa87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Intl/Icu/Locale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public static function lookup(array $languageTag, string $locale, bool $canonica
279279
/**
280280
* Not supported. Returns an associative array of locale identifier subtags.
281281
*
282-
* @return array Associative array with the extracted subtags
282+
* @return array|null Associative array with the extracted subtags
283283
*
284284
* @see https://php.net/locale.parselocale
285285
*

0 commit comments

Comments
 (0)