Skip to content

Commit

Permalink
Fixes issue #320: Module::createController() will fail with a route w…
Browse files Browse the repository at this point in the history
…ith trailing slash.
  • Loading branch information
qiangxue committed May 20, 2013
1 parent 2fccd56 commit 1b7b200
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions yii/base/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ public function createController($route)
if ($route === '') {
$route = $this->defaultRoute;
}
$route = trim($route, '/');
if (($pos = strpos($route, '/')) !== false) {
$id = substr($route, 0, $pos);
$route = substr($route, $pos + 1);
Expand Down

0 comments on commit 1b7b200

Please sign in to comment.