RE: [PEAR-CVS] cvs: pear /MDB/MDB ibase.php

From: Date: Thu, 25 Sep 2003 07:12:14 +0000
Subject: RE: [PEAR-CVS] cvs: pear /MDB/MDB ibase.php
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-21968@lists.php.net to get a copy of this message
> From: Lorenzo Alberton [mailto:quipo@php.net] > Sent: Thursday, September 25, 2003 1:49 AM > quipo Wed Sep 24 19:49:07 2003 EDT > > Modified files: > /pear/MDB/MDB ibase.php > Log: > @@ -977,7 +977,7 @@ > $this->results[$result_value][$this- > >results[$result_value]['current_row']] = $row; > } > if ($fetchmode == MDB_FETCHMODE_ASSOC) { > - $row = $row; > + //$row = $row; //WHAT IS THIS??? > } else { > $row = array_values($row); > } hehe .. sometimes when you move code around too long :-) > @@ -995,9 +995,9 @@ > if (!is_array($row)) { > return null; > } > - foreach ($row as $key => $value_with_space) { > - $row[$key] = rtrim($value_with_space); > - } > + } > + foreach ($row as $key => $value_with_space) { > + $row[$key] = rtrim($value_with_space); > } > if (isset($this->results[$result_value]['types'])) { > $row = $this->datatype->convertResultRow($result, $row); Actually this should stay where it was. All rows there are pulled from the row buffer already have rtrim applied before they were put in the buffer. However I found another issue and here is a CVS diff: RCS file: /repository/pear/MDB/MDB/ibase.php,v retrieving revision 1.60 diff -u -r1.60 ibase.php --- ibase.php 24 Sep 2003 23:49:06 -0000 1.60 +++ ibase.php 25 Sep 2003 07:08:46 -0000 @@ -969,16 +969,17 @@ $this->results[$result_value]['current_row']++; $row = @ibase_fetch_assoc($result); if (!is_array($row)) { - return null; + break; } foreach ($row as $key => $value_with_space) { $row[strtolower($key)] = rtrim($value_with_space); } $this->results[$result_value][$this->results[$result_value]['current_row ']] = $row; } - if ($fetchmode == MDB_FETCHMODE_ASSOC) { - //$row = $row; //WHAT IS THIS??? - } else { + if (!is_array($row)) { + return null; + } + if ($fetchmode !== MDB_FETCHMODE_ASSOC) { $row = array_values($row); } $this->results[$result_value]['highest_fetched_row'] = @@ -995,9 +996,9 @@ if (!is_array($row)) { return null; } - } - foreach ($row as $key => $value_with_space) { - $row[$key] = rtrim($value_with_space); + foreach ($row as $key => $value_with_space) { + $row[$key] = rtrim($value_with_space); + } } if (isset($this->results[$result_value]['types'])) { $row = $this->datatype->convertResultRow($result, $row); Regards, Lukas

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