Skip to content
Snippets Groups Projects
Commit 326845c5 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #3799 from JediKev/issue/getPrimaryLanguage-nonobject

i18n: Fix getPrimaryLanguage() on non-object
parents afa31e93 1101fb21
No related branches found
No related tags found
No related merge requests found
......@@ -364,7 +364,7 @@ class Internationalization {
return $lang = self::isLanguageInstalled($best_match_langcode)
? $best_match_langcode
: $cfg->getPrimaryLanguage();
: ($cfg ? $cfg->getPrimaryLanguage() : 'en_US');
}
static function getCurrentLanguage($user=false) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment