Commit 1b7b200c by Qiang Xue

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

parent 2fccd566
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment