Merge pull request #1558 from ramsalt/develop

Language::validateLocale should pass with locale 'zxx'.
This commit is contained in:
troosan 2019-01-30 20:18:20 +01:00 committed by GitHub
commit af31fc5340
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ final class Language extends AbstractStyle
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');
}