From c91a0f4b26ac14d75b98845eec7575a3d3b0eb57 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sun, 5 May 2013 10:14:55 -0400 Subject: [PATCH] Fixes issue #105: route var appears twice in the created URL --- framework/web/UrlManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/web/UrlManager.php b/framework/web/UrlManager.php index 329bf07..a300033 100644 --- a/framework/web/UrlManager.php +++ b/framework/web/UrlManager.php @@ -174,7 +174,7 @@ class UrlManager extends Component public function createUrl($route, $params = array()) { $anchor = isset($params['#']) ? '#' . $params['#'] : ''; - unset($params['#']); + unset($params['#'], $params[$this->routeVar]); $route = trim($route, '/'); $baseUrl = $this->getBaseUrl();