From 67d42170521fac77f63350e2691f741c899de423 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 22 Jun 2020 00:04:08 +0900 Subject: [PATCH] Set default language if lang_type is not available --- common/framework/parsers/moduleactionparser.php | 2 +- common/framework/parsers/moduleinfoparser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/framework/parsers/moduleactionparser.php b/common/framework/parsers/moduleactionparser.php index b504b4a00..b8e74a806 100644 --- a/common/framework/parsers/moduleactionparser.php +++ b/common/framework/parsers/moduleactionparser.php @@ -37,7 +37,7 @@ class ModuleActionParser } // Get the current language. - $lang = \Context::getLangType(); + $lang = \Context::getLangType() ?: 'en'; // Initialize the module definition. $info = new \stdClass; diff --git a/common/framework/parsers/moduleinfoparser.php b/common/framework/parsers/moduleinfoparser.php index 688dfbe15..76daf3af4 100644 --- a/common/framework/parsers/moduleinfoparser.php +++ b/common/framework/parsers/moduleinfoparser.php @@ -23,7 +23,7 @@ class ModuleInfoParser } // Get the current language. - $lang = \Context::getLangType(); + $lang = \Context::getLangType() ?: 'en'; // Initialize the module definition. $info = new \stdClass;