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

This commit is contained in:
Qiang Xue
2013-05-20 09:58:40 -04:00
parent 2fccd566b2
commit 1b7b200c1e

View File

@@ -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);