#23720 [NEW]: DB::Connect does not accept string for $dsn when using pgsql

From: Date: Tue, 20 May 2003 15:01:44 +0000
Subject: #23720 [NEW]: DB::Connect does not accept string for $dsn when using pgsql
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16511@lists.php.net to get a copy of this message
From: brian at onlineinfo dot net Operating system: Debian, Solaris PHP version: 4.3.1 PHP Bug Type: PEAR related Bug description: DB::Connect does not accept string for $dsn when using pgsql When passing a valid DSN to DB::Connect and connecting to pgsql, DB_Pgsql expects the dsn to be an array instead of a string. The result is a broken connect string since PHP will happily treat the string as an array. The solution is to replace: $this->dsn = $dsninfo; with: if (is_array($dsninfo)) { $this->dsn = $dsninfo; } else { $this->dsn = $dsninfo = DB::parseDSN($dsninfo); } in the connect method of DB/pgsql.php. -- Edit bug report at http://bugs.php.net/?id=23720&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23720&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23720&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23720&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23720&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23720&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23720&r=support Expected behavior: http://bugs.php.net/fix.php?id=23720&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23720&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23720&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23720&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23720&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23720&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23720&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23720&r=gnused

« previous php.pear.dev (#16511) next »