Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Router/I18nRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down