From 21b0cc73c426c1bbec36027df37e8fe18a6892ac Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sat, 24 Aug 2013 06:24:36 -0400 Subject: [PATCH] fixed uninitialized pro issue. --- framework/yii/db/Connection.php | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/yii/db/Connection.php b/framework/yii/db/Connection.php index f27698a..a843823 100644 --- a/framework/yii/db/Connection.php +++ b/framework/yii/db/Connection.php @@ -523,6 +523,7 @@ class Connection extends Component if (($pos = strpos($this->dsn, ':')) !== false) { return strtolower(substr($this->dsn, 0, $pos)); } else { + $this->open(); return strtolower($this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME)); } }