Skip to content

Commit

Permalink
Merge pull request #182 from alxlnk/master
Browse files Browse the repository at this point in the history
Preserve numeric keys.
  • Loading branch information
mikehaertl authored Nov 20, 2023
2 parents 3b98df8 + 2d626f7 commit 3f360b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions UrlManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,7 @@ protected function redirectToLanguage($language)
$params[$this->languageParam] = $language;
}
// See Yii Issues #8291 and #9161:
$params = $params + $this->_request->getQueryParams();
array_unshift($params, $route);
$params = [$route] + $params + $this->_request->getQueryParams();
$url = $this->createUrl($params);
// Required to prevent double slashes on generated URLs
if ($this->suffix === '/' && $route === '' && count($params) === 1) {
Expand Down

0 comments on commit 3f360b9

Please sign in to comment.