Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #16020 parseDSN bug - unable to set params wia dsn string
Submitted: 2009-03-11 16:41 UTC
From: alec Assigned: quipo
Status: Closed Package: MDB2 (version CVS)
PHP Version: 5.2.9 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2009-03-11 16:41 UTC] alec (Aleksander Machniak)
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); } // }}}

Comments

 [2009-03-29 21:54 UTC] quipo (Lorenzo Alberton)
-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.