Browse files

fixed bug in MDB::singleton (another one spotted by mike)

git-svn-id: http://svn.php.net/repository/pear/packages/MDB/trunk@145143 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent ba2ed87 commit b451e0df9603debb86400ccac4fdcc199ff9c0f9 Lukas Smith committed Nov 29, 2003
Showing with 1 addition and 1 deletion.
  1. +1 −1 MDB.php
View
2 MDB.php
@@ -340,7 +340,7 @@ function &singleton($dsn = null, $options = false)
$keys = array_keys($GLOBALS['_MDB_databases']);
for ($i=0, $j=count($keys); $i<$j; ++$i) {
$tmp_dsn = $GLOBALS['_MDB_databases'][$keys[$i]]->getDSN('array');
- if (count(array_diff($dsninfo, $this->dsn)) == 0) {
+ if (count(array_diff($dsninfo, $tmp_dsn)) == 0) {
MDB::setOptions($GLOBALS['_MDB_databases'][$keys[$i]], $options);
return $GLOBALS['_MDB_databases'][$keys[$i]];
}

0 comments on commit b451e0d

Please sign in to comment.