mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-16 14:29:30 +08:00
Fixes issue #320: Module::createController() will fail with a route with trailing slash.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user