Browse Source

Fixes issue #320: Module::createController() will fail with a route with trailing slash.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
1b7b200c1e
  1. 1
      yii/base/Module.php

1
yii/base/Module.php

@ -592,6 +592,7 @@ abstract class Module extends Component
if ($route === '') {
$route = $this->defaultRoute;
}
$route = trim($route, '/');
if (($pos = strpos($route, '/')) !== false) {
$id = substr($route, 0, $pos);
$route = substr($route, $pos + 1);

Loading…
Cancel
Save