diff --git a/Bootstrap.php b/Bootstrap.php index e46544a..6c88231 100644 --- a/Bootstrap.php +++ b/Bootstrap.php @@ -3,6 +3,7 @@ namespace yii2mod\cms; use yii\base\BootstrapInterface; +use yii\console\Application as ConsoleApplication; /** * Class Bootstrap @@ -23,7 +24,7 @@ public function bootstrap($app) ]; } - if (!$app->hasModule('comment')) { + if (!$app->hasModule('comment') && !($app instanceof ConsoleApplication)) { $app->setModule('comment', ['class' => 'yii2mod\comments\Module']); }