diff --git a/framework/web/DbSession.php b/framework/web/DbSession.php index 2910b40..e81aa7f 100644 --- a/framework/web/DbSession.php +++ b/framework/web/DbSession.php @@ -71,13 +71,13 @@ class DbSession extends Session */ public function init() { - parent::init(); if (is_string($this->db)) { $this->db = Yii::$app->getComponent($this->db); } if (!$this->db instanceof Connection) { throw new InvalidConfigException("DbSession::db must be either a DB connection instance or the application component ID of a DB connection."); - } + } + parent::init(); } /**