Skip to content

Commit

Permalink
Closes Issue #89 Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehaertl committed Feb 22, 2017
1 parent cc1e3ce commit eb6ca1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion UrlManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ public function createUrl($params)
if ($this->enableLocaleUrls && $this->languages) {
$params = (array) $params;

$addLanguage = false;
$isLanguageGiven = isset($params[$this->languageParam]);
$language = $isLanguageGiven ? $params[$this->languageParam] : Yii::$app->language;
$isDefaultLanguage = $language===$this->getDefaultLanguage();
Expand Down Expand Up @@ -418,6 +417,8 @@ protected function matchCode($code)
* Redirect to the current URL with given language code applied
*
* @param string $language the language code to add. Can also be empty to not add any language code.
* @throws \yii\base\Exception
* @throws \yii\web\NotFoundHttpException
*/
protected function redirectToLanguage($language)
{
Expand Down

0 comments on commit eb6ca1b

Please sign in to comment.