mirror of
https://github.com/php/php-src.git
synced 2024-11-26 11:23:47 +08:00
(DB::parseDSN) Remove extraneous / at the end of the spec if no database
is specified.
This commit is contained in:
parent
b9f27a4743
commit
9c89f731e8
@ -225,6 +225,9 @@ class DB {
|
||||
$dsn = $arr[2];
|
||||
}
|
||||
|
||||
if (!$parsed['database'])
|
||||
$dsn = preg_replace('|/+$|', '', $dsn);
|
||||
|
||||
$parsed['hostspec'] = $dsn;
|
||||
|
||||
if (!$parsed['dbsyntax']) {
|
||||
|
Loading…
Reference in New Issue
Block a user