Skip to content

Commit

Permalink
fixed bug #10598: MDB2::singleton() not working in some rare conditio…
Browse files Browse the repository at this point in the history
…ns [fornax]

git-svn-id: http://svn.php.net/repository/pear/packages/MDB2/trunk@233207 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
quipo committed Apr 3, 2007
1 parent 423c274 commit 4ba0f0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MDB2.php
Expand Up @@ -487,7 +487,7 @@ function &singleton($dsn = null, $options = false)
for ($i=0, $j=count($keys); $i<$j; ++$i) {
if (isset($GLOBALS['_MDB2_databases'][$keys[$i]])) {
$tmp_dsn = $GLOBALS['_MDB2_databases'][$keys[$i]]->getDSN('array');
if (count(array_diff($tmp_dsn, $dsninfo)) == 0) {
if (count(array_diff_assoc($tmp_dsn, $dsninfo)) == 0) {
MDB2::setOptions($GLOBALS['_MDB2_databases'][$keys[$i]], $options);
return $GLOBALS['_MDB2_databases'][$keys[$i]];
}
Expand Down
1 change: 1 addition & 0 deletions package.php
Expand Up @@ -13,6 +13,7 @@
- fixed bug #10521: quote($val,'decimal') and quote($val,'float') pass unsafe characters
- return length as "precision,scale" for NUMERIC and DECIMAL fields in mapNativeDatatype()
- fixed bug #10537: safer check for valid MDB2 connection in singleton() [fornax]
- fixed bug #10598: MDB2::singleton() not working in some rare conditions [fornax]
- in getTableIndexDefinition() and getTableConstraintDefinition() in the Reverse
module, also return the field position in the index/constraint
Expand Down

0 comments on commit 4ba0f0e

Please sign in to comment.