修正路由绑定到命名空间后 类的自动定位

This commit is contained in:
thinkphp
2016-11-01 11:41:27 +08:00
parent 64317fcec4
commit 17d146d0d9

View File

@@ -1064,12 +1064,12 @@ class Route
{
$url = str_replace($depr, '|', $url);
$array = explode('|', $url, 3);
$class = Loader::parseName(!empty($array[0]) ? $array[0] : Config::get('default_controller'), 1);
$class = !empty($array[0]) ? $array[0] : Config::get('default_controller');
$method = !empty($array[1]) ? $array[1] : Config::get('default_action');
if (!empty($array[2])) {
self::parseUrlParams($array[2]);
}
return ['type' => 'method', 'method' => [$namespace . '\\' . $class, $method]];
return ['type' => 'method', 'method' => [$namespace . '\\' . Loader::parseName($class, 1), $method]];
}
/**