NOTE: see DB.references2.diff for an updated version of this patch! Only in DB: DB.references.diff diff -u DBorig/common.php DB/common.php --- DBorig/common.php 2003-08-28 02:06:38.000000000 -0400 +++ DB/common.php 2003-08-28 02:11:53.000000000 -0400 @@ -283,7 +283,8 @@ $mode = $this->_default_error_mode; $options = $this->_default_error_options; } - return PEAR::raiseError($code, null, $mode, $options, null, null, true); + $tmp = PEAR::raiseError($code, null, $mode, $options, null, null, true); + return $tmp; } if ($userinfo === null) { @@ -294,8 +295,9 @@ $userinfo .= " [nativecode=$nativecode]"; } - return PEAR::raiseError(null, $code, $mode, $options, $userinfo, + $tmp = PEAR::raiseError(null, $code, $mode, $options, $userinfo, 'DB_Error', true); + return $tmp; } // }}} @@ -565,7 +567,8 @@ if (DB::isError($result) || $result === DB_OK) { return $result; } else { - return new DB_result($this, $result); + $tmp = new DB_result($this, $result); + return $tmp; } } @@ -763,7 +766,8 @@ if (DB::isError($result) || $result === DB_OK) { return $result; } else { - return new DB_result($this, $result); + $tmp = new DB_result($this, $result); + return $tmp; } } } @@ -1057,7 +1061,8 @@ $cols = $res->numCols(); if ($cols < 2) { - return $this->raiseError(DB_ERROR_TRUNCATED); + $tmp = $this->raiseError(DB_ERROR_TRUNCATED); + return $tmp; } $results = array(); diff -u DBorig/dbase.php DB/dbase.php --- DBorig/dbase.php 2003-08-28 02:06:38.000000000 -0400 +++ DB/dbase.php 2003-08-28 02:16:25.000000000 -0400 @@ -100,7 +100,8 @@ { // emulate result resources $this->res_row[$this->result] = 0; - return new DB_result($this, $this->result++); + $tmp = new DB_result($this, $this->result++); + return $tmp; } // }}} diff -u DBorig/ibase.php DB/ibase.php --- DBorig/ibase.php 2003-08-28 02:06:38.000000000 -0400 +++ DB/ibase.php 2003-08-28 02:17:14.000000000 -0400 @@ -348,16 +348,19 @@ } $res = call_user_func_array('ibase_execute', $pdata); if (!$res) { - return $this->ibaseRaiseError(); + $tmp = $this->ibaseRaiseError(); + return $tmp; } /* XXX need this? if ($this->autocommit && $this->manip_query[(int)$stmt]) { ibase_commit($this->connection); }*/ if ($this->manip_query[(int)$stmt]) { - return DB_OK; + $tmp = DB_OK; + return $tmp; } else { - return new DB_result($this, $res); + $tmp = new DB_result($this, $res); + return $tmp; } } diff -u DBorig/oci8.php DB/oci8.php --- DBorig/oci8.php 2003-08-28 02:06:39.000000000 -0400 +++ DB/oci8.php 2003-08-28 02:18:28.000000000 -0400 @@ -377,7 +377,8 @@ { $types=&$this->prepare_types[$stmt]; if (($size = sizeof($types)) != sizeof($data)) { - return $this->raiseError(DB_ERROR_MISMATCH); + $tmp = $this->raiseError(DB_ERROR_MISMATCH); + return $tmp; } for ($i = 0; $i < $size; $i++) { if (is_array($data)) { @@ -397,7 +398,8 @@ } } if (!@OCIBindByName($stmt, ":bind" . $i, $pdata[$i], -1)) { - return $this->oci8RaiseError($stmt); + $tmp = $this->oci8RaiseError($stmt); + return $tmp; } } if ($this->autoCommit) { @@ -406,13 +408,16 @@ $success = @OCIExecute($stmt, OCI_DEFAULT); } if (!$success) { - return $this->oci8RaiseError($stmt); + $tmp = $this->oci8RaiseError($stmt); + return $tmp; } $this->last_stmt = $stmt; if ($this->manip_query[(int)$stmt]) { - return DB_OK; + $tmp = DB_OK; + return $tmp; } else { - return new DB_result($this, $stmt); + $tmp = new DB_result($this, $stmt); + return $tmp; } } diff -u DBorig/storage.php DB/storage.php --- DBorig/storage.php 2003-08-28 02:06:39.000000000 -0400 +++ DB/storage.php 2003-08-28 02:19:19.000000000 -0400 @@ -405,7 +405,8 @@ if (isset($this->_properties[$property])) { return $this->$property; } - return null; + $tmp = null; + return $tmp; } // }}}