#23725 [Opn->Asn]: bug in callback fecthRow Sybase
| From: | arnaud@php.net | Date: | Sat, 24 May 2003 23:22:53 +0000 |
| Subject: | #23725 [Opn->Asn]: bug in callback fecthRow Sybase | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16658@lists.php.net to get a copy of this message | ||
ID: 23725
Updated by: arnaud@php.net
Reported By: cristianoarnold at yahoo dot com dot br
-Status: Open
+Status: Assigned
Bug Type: PEAR related
Operating System: Windows 2000
PHP Version: 4.3.1
-Assigned To:
+Assigned To: ssb
Previous Comments:
------------------------------------------------------------------------
[2003-05-20 14:33:34] cristianoarnold at yahoo dot com dot br
Hi
I had some trouble when I tried call next time the following fetchRow:
$array = $result->fetchRow(DB_FETCHMODE_ASSOC, $i++);
It returns the result coorect but printed the message follow and exit
Warning: sybase_data_seek() [function.sybase-data-seek]: Sybase: Bad
row offset in c:\php\pear\DB\sybase.php on line 287
The problem seems to be the following lines of code starting at line
287 of DB/sybase.php
if ($rownum !== null) {
if (!sybase_data_seek($result, $rownum)) {
return $this->sybaseRaiseError();
}
}
The following change seems to fix the problem.
if ($rownum !== null) {
if (($rownum >= 0) && ($rownum <= $this->numRows($result)))
{
@sybase_data_seek($result, $rownum);
} else {
return $this->sybaseRaiseError();
}
}
Can you fix this problem in the pear.php.net library to next version?
Than you
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23725&edit=1