cvs: pear /Auth_PrefManager PrefManager.php

From: Date: Tue, 05 Apr 2005 00:01:27 +0000
Subject: cvs: pear /Auth_PrefManager PrefManager.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-30927@lists.php.net to get a copy of this message
jellybob Mon Apr 4 20:01:27 2005 EDT Modified files: /pear/Auth_PrefManager PrefManager.php Log: Added patch submitted in #2975 http://cvs.php.net/diff.php/pear/Auth_PrefManager/PrefManager.php?r1=1.15&r2=1.16&ty=u Index: pear/Auth_PrefManager/PrefManager.php diff -u pear/Auth_PrefManager/PrefManager.php:1.15 pear/Auth_PrefManager/PrefManager.php:1.16 --- pear/Auth_PrefManager/PrefManager.php:1.15 Mon Apr 4 19:58:13 2005 +++ pear/Auth_PrefManager/PrefManager.php Mon Apr 4 20:01:26 2005 @@ -128,13 +128,16 @@ { // Connect to the database. if (isset($dsn)) { - if (is_subclass_of($dsn, 'db_common')) { - $this->_db = &$dsn; - } else { - $this->_db = DB::Connect($dsn); + if (is_string($dsn)) { + $this->_db = DB::Connect($dsn); if (DB::isError($this->_db)) { $this->_lastError = "DB Error: ".$this->_db->getMessage(); } + } else if (is_subclass_of($dsn, 'db_common')) { + $this->_db = &$dsn; + } else { + $this->_lastError = "Invalid DSN specified."; + return false; } } else { $this->_lastError = "No DSN specified.";

« previous php.pear.cvs (#30927) next »