Skip to content

Commit 69dabb9

Browse files
committed
fix bootstrap error
1 parent c857813 commit 69dabb9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"minimum-stability": "dev",
66
"require": {
7-
"php": ">=5.4.0",
7+
"php": ">=5.5.0||>=7.0",
88
"yiisoft/yii2": ">=2.0.6",
99
"symfony/filesystem": "^3.1",
1010
"symfony/finder": "^3.1",

src/Bootstrap.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ public function bootstrap($app)
3636
$app->controllerMap['env'] = [
3737
'class' => 'nullref\core\console\EnvController',
3838
];
39-
$app->getModule('core')->controllerMap['migrate'] = [
40-
'class' => 'nullref\core\console\MigrateController',
41-
];
39+
if ($module = $app->getModule('core')) {
40+
$module->controllerMap['migrate'] = [
41+
'class' => 'nullref\core\console\MigrateController',
42+
];
43+
}
4244
}
4345
if (YII_ENV_DEV && class_exists('yii\gii\Module')) {
4446
Event::on(Gii::class, Gii::EVENT_BEFORE_ACTION, function (Event $event) {

0 commit comments

Comments
 (0)