Forráskód Böngészése

fixed small bug in DB

Piotr Labudda 7 éve
szülő
commit
786ac3d211
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      SE/se-lib/DB.php

+ 3 - 2
SE/se-lib/DB.php

@@ -149,14 +149,15 @@ class DB {
 
 	public static function getStorage($db = null) {
 		$pdo = self::getPDO($db);
-		switch ($pdo->getType()) {
+		$type = $pdo->getType();
+		switch ($type) {
 			case 'mysql':
 				Lib::loadClass('Core_Storage_Mysql');
 				return new Core_Storage_Mysql($pdo);
 			case 'pgsql':
 				Lib::loadClass('Core_Storage_Pgsql');
 				return new Core_Storage_Pgsql($pdo);
-			default: throw new Exception("Storage for type '{$this->_type}' not implemented");
+			default: throw new Exception("Storage for type '{$type}' not implemented");
 		}
 	}