Browse Source

Fixes issue #105: route var appears twice in the created URL

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
c91a0f4b26
  1. 2
      framework/web/UrlManager.php

2
framework/web/UrlManager.php

@ -174,7 +174,7 @@ class UrlManager extends Component
public function createUrl($route, $params = array()) public function createUrl($route, $params = array())
{ {
$anchor = isset($params['#']) ? '#' . $params['#'] : ''; $anchor = isset($params['#']) ? '#' . $params['#'] : '';
unset($params['#']); unset($params['#'], $params[$this->routeVar]);
$route = trim($route, '/'); $route = trim($route, '/');
$baseUrl = $this->getBaseUrl(); $baseUrl = $this->getBaseUrl();

Loading…
Cancel
Save