(DB::parseDSN) Remove extraneous / at the end of the spec if no database

is specified.
This commit is contained in:
Andrei Zmievski 1999-12-07 21:30:38 +00:00
parent b9f27a4743
commit 9c89f731e8

View File

@ -225,6 +225,9 @@ class DB {
$dsn = $arr[2];
}
if (!$parsed['database'])
$dsn = preg_replace('|/+$|', '', $dsn);
$parsed['hostspec'] = $dsn;
if (!$parsed['dbsyntax']) {