From 01ae01508838864d3a450f1163924beb6b4f78b1 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Wed, 8 May 2013 06:58:34 -0400 Subject: [PATCH] Fixes issue #180: DbSession crashes with autoStart --- framework/web/DbSession.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } /**