|
|
@@ -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");
|
|
|
}
|
|
|
}
|
|
|
|