diff --git a/core/base/Boot.php b/core/base/Boot.php index 114713bec..e45d93314 100644 --- a/core/base/Boot.php +++ b/core/base/Boot.php @@ -215,8 +215,6 @@ public function run() */ public function applicationConsole() { - $this->includeYii(); - $this->setIsCli(true); $config = $this->getConfigArray(); $config['defaultRoute'] = 'help'; @@ -226,6 +224,8 @@ public function applicationConsole() } } + $this->includeYii(); + $baseUrl = null; if (isset($config['consoleBaseUrl'])) { $baseUrl = $config['consoleBaseUrl']; @@ -258,8 +258,8 @@ public function applicationConsole() */ public function applicationWeb() { - $this->includeYii(); $config = $this->getConfigArray(); + $this->includeYii(); $mergedConfig = ArrayHelper::merge($config, ['bootstrap' => ['luya\web\Bootstrap']]); $this->app = new WebApplication($mergedConfig); if (!$this->mockOnly) {