RE: [PEAR-CVS] cvs: pear(MDB_1) /MDB/MDB ibase.php
| From: | Lukas Smith | Date: | Wed, 01 Oct 2003 08:39:26 +0000 |
| Subject: | RE: [PEAR-CVS] cvs: pear(MDB_1) /MDB/MDB ibase.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-13201@lists.php.net to get a copy of this message | ||
> From: Mirco 'meebey' Bauer [mailto:pear-cvs@meebey.net]
> Sent: Wednesday, October 01, 2003 10:35 AM
> To: pear-cvs@lists.php.net
> Subject: Re: [PEAR-CVS] cvs: pear(MDB_1) /MDB/MDB ibase.php
>
> This commit has also big changes in important functions like
fetchRow()
> but the CVS log just says CS fixes.
>
> Here is what I found that looks buggy to me: (which is according to
> changelog just CS fix)
> - function fetchRow($result, $row)
> - {
> - //should I do this? Why $row is NULL by default and not 0?
> - if(is_null($row)) {
> - $row = 0;
> + if (is_null($rownum)) {
> + $rownum = $this->highest_fetched_row[$result_value] + 1;
> }
> - $result_value = intval($result);
> ... (more changes, but not important for my point)
>
> the 2. parameter is called $row and you check for is_null($rownum)
which
> is always true because its an undefined variable.
>
> You should use a proper error reporting level in your php.ini, then
you
> find bugs like this very easy...
Thx for being on the look out.
But this is actually correct.
The reason being that fetchRow was removed and the code is no in
fetchInto where the parameter is infact called $rownum.
Regards,
Lukas