Re: oci8.php bugfix
| From: | (Stig Sæther Bakken) | Date: | Sat, 24 Mar 2001 16:20:37 +0000 |
| Subject: | Re: oci8.php bugfix | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-82@lists.php.net to get a copy of this message | ||
[Paul Rees <paul.rees@surfeu.com>]
> 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();
n> }
>
> ...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?
Hi!
I just removed the "if (!$row)" test from oci8.php. Could you test
with revision 1.21 of oci8.php (the latest one)?
- Stig
--
Stig Sæther Bakken <ssb@fast.no>
Fast Search & Transfer ASA, Trondheim, Norway