Bug in oci8.php?

[email protected] ("Paul Rees") Mon, 12 Mar 2001 16:20:08 +0100
Newsgroups php.pear
Message-ID <[email protected]>
In article <01031213200801.00826@defiant>, Thomas Fromm
<[email protected]> writes
>Hi,
>
>> if (DB::isError ($result = $db_con -> query ($sql)))
>>         handle_db_error ($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
>
>seems to be a bug in errorhandling. this error occurs, when its tried
to
>fetch one more row, where no one more row to fetch is ;)
>
>just put an @ before every oci* function, because this warnings don't
be
>showed and must handled in pear....
>
>--tf
>

Well, you're right in that it seems to stem from the PEAR error
handling
routines. Unfortunately, I can't use your suggestion as there's a bit
of
an infinite loop thing going on - and I feel uncomfortable with
arbitrarily suppressing error messages. However, commenting out:

        if (!$row) {
            return $this->raiseError();

from the fetchRow() function in oci8.php allows me to carry on working
for the time being. Errors are still reported, so I wonder what the
benefit of the above is?

All the best,
--
Paul Rees