lsmith Mon Jan 27 17:09:37 2003 EDT
Modified files:
/pear/MDB/MDB Common.php
Log:
fixed bugs related to the handling of autofree
Index: pear/MDB/MDB/Common.php
diff -u pear/MDB/MDB/Common.php:1.87 pear/MDB/MDB/Common.php:1.88
--- pear/MDB/MDB/Common.php:1.87 Sun Jan 19 06:12:43 2003
+++ pear/MDB/MDB/Common.php Mon Jan 27 17:09:37 2003
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@xxxxxxxxxxxxxxxx> |
// +----------------------------------------------------------------------+
//
-// $Id: Common.php,v 1.87 2003/01/19 11:12:43 lsmith Exp $
+// $Id: Common.php,v 1.88 2003/01/27 22:09:37 lsmith Exp $
/**
* @package MDB
@@ -3523,7 +3523,7 @@
function fetchOne($result)
{
$res = $this->fetchInto($result, MDB_FETCHMODE_ORDERED);
- if (!$this->options['autofree'] && $res != NULL) {
+ if (!$this->options['autofree'] || $res != NULL) {
$this->freeResult($result);
}
if (MDB::isError($res)) {
@@ -3547,7 +3547,7 @@
function fetchRow($result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = 0)
{
$res = $this->fetchInto($result, $fetchmode, $rownum);
- if (!$this->options['autofree'] && $res != NULL) {
+ if (!$this->options['autofree'] || $res != NULL) {
$this->freeResult($result);
}
return($res);
@@ -3571,7 +3571,7 @@
while (is_array($res = $this->fetchInto($result, $fetchmode))) {
$column[] = $res[$colnum];
}
- if (!$this->options['autofree'] && $res != NULL) {
+ if (!$this->options['autofree']) {
$this->freeResult($result);
}
if (MDB::isError($res)) {
@@ -3611,7 +3611,7 @@
return($this->raiseError(MDB_ERROR_TRUNCATED));
}
}
- $all = array();
+ $all = array();
while (is_array($res = $this->fetchInto($result, $fetchmode))) {
if ($rekey) {
if ($fetchmode & MDB_FETCHMODE_ASSOC) {
@@ -3639,7 +3639,7 @@
}
}
}
- if (!$this->options['autofree'] && $res != NULL) {
+ if (!$this->options['autofree']) {
$this->freeResult($result);
}
if (MDB::isError($res)) {
--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|