Permalink
Browse files

fix: route checking

  • Loading branch information...
HFO4 committed Dec 22, 2018
1 parent 3514ff4 commit 6b4f999bc4d444ece70e0eb3600a3ec7aab3cd20
Showing with 3 additions and 0 deletions.
  1. +3 −0 thinkphp/library/think/App.php
@@ -551,6 +551,9 @@ public static function routeCheck($request, array $config)
if (is_file(CONF_PATH . $file . CONF_EXT)) {
// 导入路由配置
$rules = include CONF_PATH . $file . CONF_EXT;
if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
if (is_array($rules)) {
Route::import($rules);
}

0 comments on commit 6b4f999

Please sign in to comment.