Bug #16020 [Opn->Csd]: parseDSN bug - unable to set params wia dsn string
| From: | l dot alberton at quipo dot it | Date: | Sun, 29 Mar 2009 16:54:08 +0000 |
| Subject: | Bug #16020 [Opn->Csd]: parseDSN bug - unable to set params wia dsn string | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-277@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=16020&edit=1
ID: 16020
Updated by: l.alberton@quipo.it
Reported By: alec at alec dot pl
Summary: parseDSN bug - unable to set params wia dsn string
-Status: Open
+Status: Closed
Type: Bug
Package: MDB2
Package Version: CVS
PHP Version: 5.2.9
-Assigned To:
+Assigned To: quipo
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: quipo
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on
pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Previous Comments:
------------------------------------------------------------------------
[2009-03-11 12:41:59] alec
Description:
------------
In specified dsn string "sqlite://./temp/sqlite.db?mode=0600" the
'mode' parameter isn't working. Here's the patch:
--- MDB2.old 2009-03-11 13:36:10.511390348 +0100
+++ MDB2.php 2009-03-11 13:35:41.166750278 +0100
@@ -826,7 +824,7 @@
*/
function parseDSN($dsn)
{
- $parsed = $GLOBALS['_MDB2_dsninfo_default'];
+ $parsed = array();
if (is_array($dsn)) {
$dsn = array_merge($parsed, $dsn);
@@ -856,7 +855,7 @@
}
if (!count($dsn)) {
- return $parsed;
+ return array_merge($GLOBALS['_MDB2_dsninfo_default'],
$parsed);
}
// Get (if found): username and password
@@ -939,7 +938,7 @@
}
}
- return $parsed;
+ return array_merge($GLOBALS['_MDB2_dsninfo_default'],
$parsed);
}
// }}}
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16020&edit=1