diff options
author | Andrei Zmievski <andrei@php.net> | 1999-12-07 21:30:38 +0000 |
---|---|---|
committer | Andrei Zmievski <andrei@php.net> | 1999-12-07 21:30:38 +0000 |
commit | 9c89f731e8802fcb3b42a87dfb214ac42f654bae (patch) | |
tree | 68614eb94093a1797d9f9bb1819022df07cfbe55 /pear/DB.php | |
parent | b9f27a4743e153edbcb18afcc23a944a70950d81 (diff) | |
download | php-git-9c89f731e8802fcb3b42a87dfb214ac42f654bae.tar.gz |
(DB::parseDSN) Remove extraneous / at the end of the spec if no database
is specified.
Diffstat (limited to 'pear/DB.php')
-rw-r--r-- | pear/DB.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pear/DB.php b/pear/DB.php index 9585be30ed..52c50c7919 100644 --- a/pear/DB.php +++ b/pear/DB.php @@ -225,6 +225,9 @@ class DB { $dsn = $arr[2]; } + if (!$parsed['database']) + $dsn = preg_replace('|/+$|', '', $dsn); + $parsed['hostspec'] = $dsn; if (!$parsed['dbsyntax']) { |