#23725 [NEW]: bug in callback fecthRow Sybase
| From: | cristianoarnold at yahoo dot com dot br | Date: | Tue, 20 May 2003 19:33:35 +0000 |
| Subject: | #23725 [NEW]: bug in callback fecthRow Sybase | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-16540@lists.php.net to get a copy of this message | ||
From: cristianoarnold at yahoo dot com dot br
Operating system: Windows 2000
PHP version: 4.3.1
PHP Bug Type: PEAR related
Bug description: bug in callback fecthRow Sybase
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 bug report at http://bugs.php.net/?id=23725&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23725&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23725&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23725&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23725&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23725&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23725&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23725&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23725&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23725&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23725&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23725&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23725&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23725&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23725&r=gnused