Skip to content

Commit

Permalink
Merge pull request #3799 from JediKev/issue/getPrimaryLanguage-nonobject
Browse files Browse the repository at this point in the history
i18n: Fix getPrimaryLanguage() on non-object
  • Loading branch information
protich committed May 13, 2017
2 parents afa31e9 + 1101fb2 commit 326845c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/class.i18n.php
Expand Up @@ -364,7 +364,7 @@ static function getDefaultLanguage() {

return $lang = self::isLanguageInstalled($best_match_langcode)
? $best_match_langcode
: $cfg->getPrimaryLanguage();
: ($cfg ? $cfg->getPrimaryLanguage() : 'en_US');
}

static function getCurrentLanguage($user=false) {
Expand Down

0 comments on commit 326845c

Please sign in to comment.