Skip to content

Commit 491f66a

Browse files
author
igor-chepurnoi
committed
fix Bootstrap
1 parent e7759cc commit 491f66a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Bootstrap.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace yii2mod\cms;
44

55
use yii\base\BootstrapInterface;
6+
use yii\console\Application as ConsoleApplication;
67

78
/**
89
* Class Bootstrap
@@ -23,7 +24,7 @@ public function bootstrap($app)
2324
];
2425
}
2526

26-
if (!$app->hasModule('comment')) {
27+
if (!$app->hasModule('comment') && !($app instanceof ConsoleApplication)) {
2728
$app->setModule('comment', ['class' => 'yii2mod\comments\Module']);
2829
}
2930

0 commit comments

Comments
 (0)