From 9c89f731e8802fcb3b42a87dfb214ac42f654bae Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Tue, 7 Dec 1999 21:30:38 +0000 Subject: [PATCH] (DB::parseDSN) Remove extraneous / at the end of the spec if no database is specified. --- pear/DB.php | 3 +++ 1 file changed, 3 insertions(+) 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']) { -- 2.40.0