ssb Tue Feb 20 15:00:09 2001 EDT
Modified files:
/php4/pear DB.php
Log:
* allow empty passwords in dsn (for example "mysql://user:@database")
Index: php4/pear/DB.php
diff -u php4/pear/DB.php:1.48 php4/pear/DB.php:1.49
--- php4/pear/DB.php:1.48 Fri Feb 16 09:14:39 2001
+++ php4/pear/DB.php Tue Feb 20 15:00:08 2001
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: DB.php,v 1.48 2001/02/16 17:14:39 chagenbu Exp $
+// $Id: DB.php,v 1.49 2001/02/20 23:00:08 ssb Exp $
//
// Database independent query interface.
//
@@ -413,7 +413,7 @@
$dsn = $arr[1];
}
- if (preg_match("|^([^:]+):([^@]+)@?(.*)$|", $dsn, $arr)) {
+ if (preg_match("|^([^:]+):([^@]*)@?(.*)$|", $dsn, $arr)) {
$parsed["username"] = urldecode($arr[1]);
$parsed["password"] = urldecode($arr[2]);
$dsn = $arr[3];
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]