cvs: /php4/pear DB.php

From: Date: Tue, 07 Dec 1999 21:39:22 +0000
Subject: cvs: /php4/pear DB.php
Groups: php.version4 
Request: Send a blank email to php-version4+get-7645@lists.php.net to get a copy of this message
andrei Tue Dec 7 16:39:22 1999 EDT Modified files: /php4/pear DB.php Log: (DB::parseDSN) check for an extra / at the end purely to guard against user error Index: php4/pear/DB.php diff -u php4/pear/DB.php:1.5 php4/pear/DB.php:1.6 --- php4/pear/DB.php:1.5 Tue Dec 7 16:30:38 1999 +++ php4/pear/DB.php Tue Dec 7 16:38:51 1999 @@ -206,7 +206,7 @@ return $parsed; // XXX ADDREF } - if (preg_match('|^(.*)/([^/]+)$|', $dsn, &$arr)) { + if (preg_match('|^(.*)/([^/]+)/?$|', $dsn, &$arr)) { $parsed['database'] = $arr[2]; $dsn = $arr[1]; } @@ -226,7 +226,7 @@ } if (!$parsed['database']) - $dsn = preg_replace('|/+$|', '', $dsn); + $dsn = preg_replace('|/+$|', '', &$dsn); $parsed['hostspec'] = $dsn;

« previous php.version4 (#7645) next »