Merge pull request #1558 from ramsalt/develop
Language::validateLocale should pass with locale 'zxx'.
This commit is contained in:
commit
af31fc5340
@ -229,7 +229,7 @@ final class Language extends AbstractStyle
|
|||||||
return strtolower($locale) . '-' . strtoupper($locale);
|
return strtolower($locale) . '-' . strtoupper($locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($locale !== null && strstr($locale, '-') === false) {
|
if ($locale !== null && $locale !== 'zxx' && strstr($locale, '-') === false) {
|
||||||
throw new \InvalidArgumentException($locale . ' is not a valid language code');
|
throw new \InvalidArgumentException($locale . ' is not a valid language code');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user