Merge pull request #2272 from seamuslee001/php81_locale
PHP8.1 Fix issue with passing NULL value for locale into string function
This commit is contained in:
commit
2ee6df65bc
|
|
@ -232,7 +232,7 @@ final class Language extends AbstractStyle
|
|||
$locale = str_replace('_', '-', $locale);
|
||||
}
|
||||
|
||||
if (strlen($locale) === 2) {
|
||||
if ($locale !== null && strlen($locale) === 2) {
|
||||
return strtolower($locale) . '-' . strtoupper($locale);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue