PHP8.1 Fix issue with passing NULL value for locale into string function
This commit is contained in:
parent
4dc34d43d8
commit
2f93873a7c
|
|
@ -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