修正Route类一处错误

This commit is contained in:
thinkphp
2016-05-22 11:52:46 +08:00
parent 988671e991
commit 990f34c24c

View File

@@ -698,6 +698,7 @@ class Route
if ($autoSearch) { if ($autoSearch) {
// 自动搜索控制器 // 自动搜索控制器
$dir = APP_PATH . ($module ? $module . DS : '') . CONTROLLER_LAYER; $dir = APP_PATH . ($module ? $module . DS : '') . CONTROLLER_LAYER;
$item = [];
foreach ($path as $val) { foreach ($path as $val) {
$item[] = array_shift($path); $item[] = array_shift($path);
if (is_file($dir . DS . $val . EXT)) { if (is_file($dir . DS . $val . EXT)) {