From 94052b6e018af84775068d38e430adbadfdc08d2 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Mon, 20 Jul 2020 17:03:49 +0800 Subject: [PATCH] fixed bug --- extend/catcher/ModuleService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/extend/catcher/ModuleService.php b/extend/catcher/ModuleService.php index d65de6c..7285308 100644 --- a/extend/catcher/ModuleService.php +++ b/extend/catcher/ModuleService.php @@ -55,11 +55,13 @@ abstract class ModuleService extends Service if (method_exists($this,'loadCommands') && $this->app->runningInConsole()) { list($namespace, $path) = $this->loadCommands(); - $catchConsole = $this->app['catch_console']; + if ($this->app->has('catch_console')) { + $catchConsole = $this->app['catch_console']; - $this->commands($catchConsole->setNamespace($namespace) - ->path($path) - ->commands()); + $this->commands($catchConsole->setNamespace($namespace) + ->path($path) + ->commands()); + } } }