From 3c9fa2df13517c3ffa29aaaea7da6c3455a909e6 Mon Sep 17 00:00:00 2001 From: Stathis Papadopoulos Date: Mon, 28 Jan 2019 10:50:28 +0100 Subject: [PATCH] Language::validateLocale should pass with locale 'zxx'. --- src/PhpWord/Style/Language.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpWord/Style/Language.php b/src/PhpWord/Style/Language.php index 8174f6eeb9..dd3ed819be 100644 --- a/src/PhpWord/Style/Language.php +++ b/src/PhpWord/Style/Language.php @@ -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'); }