cvs: php4 /pear/DB pgsql.php
| From: | Jon Parise | Date: | Tue, 03 Apr 2001 03:27:46 +0000 |
| Subject: | cvs: php4 /pear/DB pgsql.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4956@lists.php.net to get a copy of this message | ||
jon Mon Apr 2 20:27:46 2001 EDT
Modified files:
/php4/pear/DB pgsql.php
Log:
Make the 'protocol' DSN element optional.
Index: php4/pear/DB/pgsql.php
diff -u php4/pear/DB/pgsql.php:1.34 php4/pear/DB/pgsql.php:1.35
--- php4/pear/DB/pgsql.php:1.34 Wed Mar 28 15:52:21 2001
+++ php4/pear/DB/pgsql.php Mon Apr 2 20:27:46 2001
@@ -79,8 +79,9 @@
{
$this->dsn = $dsninfo;
$host = $dsninfo['hostspec'];
+ $protocol = (isset($dsninfo['protocol'])) ? $dsninfo['protocol'] :
'';
$connstr = '';
- if (($host !== false) && ($dsninfo['protocol'] != 'unix')){
+ if (($host !== false) && ($protocol != 'unix')){
if (($pos=strpos(':', $host)) !== false) {
$dbhost = substr($host, 0, $pos);
$port = substr($host, $pos+1);