Permalink
Browse files

Fixed #5766 along with another reference vs php-5.0.5 bug

git-svn-id: http://svn.php.net/repository/pear/packages/DB_NestedSet/trunk@204843 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
Daniel Khan
Daniel Khan committed Jan 8, 2006
1 parent 1043ce7 commit f5be6dc9af415ee478e5cb2f94cf53da16affbd6
Showing with 5 additions and 2 deletions.
  1. +5 −2 NestedSet/DB.php
View
@@ -44,10 +44,13 @@ class DB_NestedSet_DB extends DB_NestedSet {
* @param mixed $dsn DSN as PEAR dsn URI or dsn Array
* @param array $params Database column fields which should be returned
*/
- function & DB_NestedSet_DB($dsn, $params = array()) {
+ function DB_NestedSet_DB($dsn, $params = array()) {
$this->_debugMessage('DB_NestedSet_DB($dsn, $params = array())');
$this->DB_NestedSet($params);
$this->db = & $this->_db_Connect($dsn);
+ if ($this->_isDBError($this->db)) {
+ return false;
+ }
$this->db->setFetchMode(DB_FETCHMODE_ASSOC);
}
// }}}
@@ -162,4 +165,4 @@ function _db_Disconnect() {
}
// }}}
}
-?>
+?>

0 comments on commit f5be6dc

Please sign in to comment.