From 0766757cce785eeaba8f7eb2c67157373a52e78b Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 7 May 2018 21:02:03 +0800 Subject: [PATCH] fixed a router bug --- src/Fasim/Core/Router.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Fasim/Core/Router.php b/src/Fasim/Core/Router.php index da83afe..0830ea8 100644 --- a/src/Fasim/Core/Router.php +++ b/src/Fasim/Core/Router.php @@ -81,14 +81,15 @@ public function init() { break; } } - if ($matched) { - if (isset($matched['module'])) { - $this->defaultModule = $matched['module']; - if (isset($value['controller'])) { - $this->defaultController = $matched['controller']; - if (isset($value['action'])) { - $this->defaultAction = $matched['action']; - } + } + + if ($matched) { + if (isset($matched['module'])) { + $this->defaultModule = $matched['module']; + if (isset($value['controller'])) { + $this->defaultController = $matched['controller']; + if (isset($value['action'])) { + $this->defaultAction = $matched['action']; } } }