Skip to content

Commit

Permalink
Update method LanguageUrlTrait::getLanguage()
Browse files Browse the repository at this point in the history
  • Loading branch information
lav45 committed Jul 31, 2016
1 parent bd0d146 commit ed86f9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/web/LanguageUrlTrait.php
Expand Up @@ -36,7 +36,7 @@ trait LanguageUrlTrait
public function getLanguage()
{
if ($this->_language === null) {
$this->_language = $this->getPrimaryLanguage(Yii::$app->language);
$this->setLanguage(Yii::$app->language);
}
return $this->_language;
}
Expand All @@ -46,7 +46,7 @@ public function getLanguage()
*/
public function setLanguage($locale)
{
$this->_language = empty($locale) ? null : $this->getPrimaryLanguage($locale);
$this->_language = $this->getPrimaryLanguage($locale);
}

/**
Expand Down

0 comments on commit ed86f9f

Please sign in to comment.