oci8.php bugfix

From: Date: Fri, 23 Mar 2001 12:17:53 +0000
Subject: oci8.php bugfix
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-69@lists.php.net to get a copy of this message
Hi, A while ago I posted something like this: ================================================== This code: $sql = "select * from TABLE_NAME"; if (DB::isError ($result = $db_con -> query ($sql))) echo DB::errorMessage($result); else while ($resultRow = $result -> fetchRow()) { echo $resultRow[0] . '<BR>'; } ...returns this Oracle error: Warning: OCIFetchInto: ORA-01002: fetch out of sequence in DB/oci8.php on line 206 ... in an infinite loop until the script times out (latest PEAR classes from CVS, Oracle 8.1.6 Linux, php 4.04pl1) ================================================== I've had a poke about now and found that changing this: if (!$row) { return $this->raiseError(); } if ($moredata == NULL) { return NULL; } ...to this: if ($moredata == NULL) { return NULL; } if (!$row) { return $this->raiseError(); } ...in oci8.php - fetchRow() ...fixes things nicely for me and appears to maintain existing functionality. Perhaps someone would like to confirm/check things and apply the patch? All the best, -- Paul Rees

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