升级到5.1.28版本
This commit is contained in:
1 parent
4bc2bfa35a
commit
81d9f5e5e5
23 files changed
+321
-150
No files matched your search
@@ -12,6 +12,7 @@
|
||||
namespace think\route\dispatch;
|
||||
|
||||
use ReflectionMethod;
|
||||
use think\Controller;
|
||||
use think\exception\ClassNotFoundException;
|
||||
use think\exception\HttpException;
|
||||
use think\Loader;
|
||||
@@ -91,6 +92,10 @@ class Module extends Dispatch
|
||||
$this->rule->getConfig('url_controller_layer'),
|
||||
$this->rule->getConfig('controller_suffix'),
|
||||
$this->rule->getConfig('empty_controller'));
|
||||
|
||||
if ($instance instanceof Controller) {
|
||||
$instance->registerMiddleware();
|
||||
}
|
||||
} catch (ClassNotFoundException $e) {
|
||||
throw new HttpException(404, 'controller not exists:' . $e->getClass());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user