Skip to content

Commit

Permalink
Merge pull request #1558 from ramsalt/develop
Browse files Browse the repository at this point in the history
Language::validateLocale should pass with locale 'zxx'.
  • Loading branch information
troosan authored Jan 30, 2019
2 parents 1956908 + 3c9fa2d commit af31fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpWord/Style/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ private function validateLocale($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');
}

Expand Down

0 comments on commit af31fc5

Please sign in to comment.