Skip to content

Commit 284096f

Browse files
committed
add check module
1 parent 165ddcf commit 284096f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Bootstrap.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class Bootstrap implements BootstrapInterface
1414
*/
1515
public function bootstrap($app)
1616
{
17-
if ($app instanceof \yii\web\Application) {
18-
$i18nModule = Yii::$app->getModule('i18n');
17+
if ($app instanceof \yii\web\Application && $i18nModule = Yii::$app->getModule('i18n')) {
1918
$moduleId = $i18nModule->id;
2019
$app->getUrlManager()->addRules([
2120
'translations/<id:\d+>' => $moduleId . '/default/update',

0 commit comments

Comments
 (0)