#23725 [Asn->Csd]: bug in callback fecthRow Sybase

From: Date: Sat, 21 Jun 2003 17:22:54 +0000
Subject: #23725 [Asn->Csd]: bug in callback fecthRow Sybase
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17610@lists.php.net to get a copy of this message
ID: 23725 Updated by: cox@php.net Reported By: cristianoarnold at yahoo dot com dot br -Status: Assigned +Status: Closed Bug Type: PEAR related Operating System: Windows 2000 PHP Version: 4.3.1 Assigned To: ssb New Comment: Fixed in CVS, will be shipped in next PEAR DB version. Thanks for the report 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

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