diff --git a/Bootstrap.php b/Bootstrap.php index 9a834f4..8be57a4 100644 --- a/Bootstrap.php +++ b/Bootstrap.php @@ -45,7 +45,7 @@ class Bootstrap implements \yii\base\BootstrapInterface public function bootstrap($app) { /** @var $module Module */ - if ($app->hasModule('oauth2') && $module = $app->getModule('oauth2') instanceof Module) { + if ($app->hasModule('oauth2') && ($module = $app->getModule('oauth2')) instanceof Module) { $this->_modelMap = array_merge($this->_modelMap, $module->modelMap); foreach ($this->_modelMap as $name => $definition) { \Yii::$container->set("filsh\\yii2\\oauth2server\\models\\" . $name, $definition);