cvs: php4 /pear/DB ibase.php

From: Date: Tue, 22 Jan 2002 14:43:31 +0000
Subject: cvs: php4 /pear/DB ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-2053@lists.php.net to get a copy of this message
cox Tue Jan 22 09:43:31 2002 EDT Modified files: /php4/pear/DB ibase.php Log: - Fix a problem with the cast to array from ibase_fetch_object (reported by Ludovico Magnocavallo <ludo@sumatrasolutions.com>) - Removed old, unsupported, unused DB_ibase->fetchRow() (remember that fetchRow is a method from DB_result not DB_driver) Index: php4/pear/DB/ibase.php diff -u php4/pear/DB/ibase.php:1.29 php4/pear/DB/ibase.php:1.30 --- php4/pear/DB/ibase.php:1.29 Sun Jan 13 16:59:43 2002 +++ php4/pear/DB/ibase.php Tue Jan 22 09:43:30 2002 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.29 2002/01/13 21:59:43 cox Exp $ +// $Id: ibase.php,v 1.30 2002/01/22 14:43:30 cox Exp $ // // Database independent query interface definition for PHP's Interbase // extension. @@ -145,36 +145,13 @@ // }}} - function &fetchRow($result, $fetchmode = DB_FETCHMODE_DEFAULT) - { - if ($fetchmode == DB_FETCHMODE_DEFAULT) { - $fetchmode = $this->fetchmode; - } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $row = (array)ibase_fetch_object($result); - } else { - $row = ibase_fetch_row($result); - } - if (!$row) { - if ($errmsg = ibase_errmsg()) { - return $this->raiseError($errmsg); - } else { - return null; - } - } - return $row; - } - - function fetchInto($result, &$ar, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null) + function fetchInto($result, &$ar, $fetchmode, $rownum = null) { if ($rownum !== NULL) { return $this->raiseError(DB_ERROR_NOT_CAPABLE); } - if ($fetchmode == DB_FETCHMODE_DEFAULT) { - $fetchmode = $this->fetchmode; - } if ($fetchmode & DB_FETCHMODE_ASSOC) { - $ar = (array)ibase_fetch_object($result); + $ar = get_object_vars(ibase_fetch_object($result)); } else { $ar = ibase_fetch_row($result); }

« previous php.pear.cvs (#2053) next »