改进Route类

This commit is contained in:
thinkphp
2016-10-22 21:02:04 +08:00
parent b5b5390832
commit 70e534f2fb

View File

@@ -1206,7 +1206,7 @@ class Route
// 检查地址是否被定义过路由
$name = strtolower($module . '/' . Loader::parseName($controller, 1) . '/' . $action);
$name2 = '';
if (isset(self::$bind['module']) && $module == self::$bind['module']) {
if (empty($module) || isset(self::$bind['module']) && $module == self::$bind['module']) {
$name2 = strtolower(Loader::parseName($controller, 1) . '/' . $action);
}