diff --git a/Router/I18nRouter.php b/Router/I18nRouter.php index 42dd248..d2fadee 100644 --- a/Router/I18nRouter.php +++ b/Router/I18nRouter.php @@ -197,12 +197,12 @@ private function matchI18n(array $params, $url) $currentLocale = $this->localeResolver->resolveLocale( $request, $params['_locales'] ); - - // If the locale resolver was not able to determine a locale, then all efforts to - // make an informed decision have failed. Just display something as a last resort. - if (!$currentLocale) { - $currentLocale = reset($params['_locales']); - } + } + + // If the locale resolver was not able to determine a locale, then all efforts to + // make an informed decision have failed. Just display something as a last resort. + if (!$currentLocale) { + $currentLocale = reset($params['_locales']); } if (!in_array($currentLocale, $params['_locales'], true)) {