diff options
author | Simon Holywell <[email protected]> | 2013-01-30 09:22:31 +0000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2013-01-30 09:22:31 +0000 |
commit | 7a43f5dcd50f11217b609fbc89c4239e97482da9 (patch) | |
tree | e3158a80762277a125f68ff2c08b40c145dab141 | |
parent | 38590e8db6f68a9f42c21225f2bf34a0b99e1718 (diff) |
Closes issue #99 Undefined index error
-rw-r--r-- | idiorm.php | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -218,7 +218,8 @@ */ protected static function _setup_db($connection_name = self::DEFAULT_CONNECTION) { - if (!is_object(self::$_db[$connection_name])) { + if (!array_key_exists($connection_name, self::$_db) || + !is_object(self::$_db[$connection_name])) { self::_setup_db_config($connection_name); $db = new PDO( |