mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 05:45:33 +08:00
Merge pull request #3614 from klimov-paul/route-url-encode
Route parameter url encoding added
This commit is contained in:
@@ -36,6 +36,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #3578: Fixed postgreSQL column type detection, added missing types (MDMunir, cebe)
|
||||
- Bug #3591: Fix incomplete obsolete filling in i18n `MessageController::saveMessagesToDb()` (advsm)
|
||||
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)
|
||||
- Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul)
|
||||
- Enh #2264: `CookieCollection::has()` will return false for expired or removed cookies (qiangxue)
|
||||
- Enh #2435: `yii\db\IntegrityException` is now thrown on database integrity errors instead of general `yii\db\Exception` (samdark)
|
||||
- Enh #2837: Error page now shows arguments in stack trace method calls (samdark)
|
||||
|
||||
@@ -325,7 +325,7 @@ class UrlManager extends Component
|
||||
|
||||
return "$baseUrl/{$route}{$anchor}";
|
||||
} else {
|
||||
$url = "$baseUrl?{$this->routeParam}=$route";
|
||||
$url = "$baseUrl?{$this->routeParam}=" . urlencode($route);
|
||||
if (!empty($params) && ($query = http_build_query($params)) !== '') {
|
||||
$url .= '&' . $query;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user