Commit 4ae7eb18 by Qiang Xue

Fixes #6697.

parent 147abc82
...@@ -378,7 +378,7 @@ class BaseUrl ...@@ -378,7 +378,7 @@ class BaseUrl
public static function current(array $params = [], $scheme = false) public static function current(array $params = [], $scheme = false)
{ {
$currentParams = Yii::$app->getRequest()->getQueryParams(); $currentParams = Yii::$app->getRequest()->getQueryParams();
$currentParams[0] = Yii::$app->controller->getRoute(); $currentParams[0] = '/' . Yii::$app->controller->getRoute();
$route = ArrayHelper::merge($currentParams, $params); $route = ArrayHelper::merge($currentParams, $params);
return static::toRoute($route, $scheme); return static::toRoute($route, $scheme);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment