Skip to content

Commit af31fc5

Browse files
authored
Merge pull request #1558 from ramsalt/develop
Language::validateLocale should pass with locale 'zxx'.
2 parents 1956908 + 3c9fa2d commit af31fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Style/Language.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ private function validateLocale($locale)
229229
return strtolower($locale) . '-' . strtoupper($locale);
230230
}
231231

232-
if ($locale !== null && strstr($locale, '-') === false) {
232+
if ($locale !== null && $locale !== 'zxx' && strstr($locale, '-') === false) {
233233
throw new \InvalidArgumentException($locale . ' is not a valid language code');
234234
}
235235

0 commit comments

Comments
 (0)