cvs: pear /MDB2/MDB2/Driver/Datatype ibase.php

From: Date: Wed, 08 Jun 2005 17:40:19 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Datatype ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32430@lists.php.net to get a copy of this message
quipo Wed Jun 8 13:40:19 2005 EDT Modified files: /pear/MDB2/MDB2/Driver/Datatype ibase.php Log: fixed _quoteLOB() [was closing the wrong handle] http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/ibase.php?r1=1.33&r2=1.34&ty=u Index: pear/MDB2/MDB2/Driver/Datatype/ibase.php diff -u pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.33 pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.34 --- pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.33 Sat May 21 19:00:36 2005 +++ pear/MDB2/MDB2/Driver/Datatype/ibase.php Wed Jun 8 13:40:18 2005 @@ -44,7 +44,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.33 2005/05/21 23:00:36 lsmith Exp $ +// $Id: ibase.php,v 1.34 2005/06/08 17:40:18 quipo Exp $ require_once 'MDB2/Driver/Datatype/Common.php'; @@ -418,14 +418,14 @@ $value = $fp; } if ($db->in_transaction) { - $value = @ibase_blob_import($db->transaction_id, $value); + $blob_id = @ibase_blob_import($db->transaction_id, $value); } else { - $value = @ibase_blob_import($db->connection, $value); + $blob_id = @ibase_blob_import($db->connection, $value); } if ($close) { @fclose($value); } - return $value; + return $blob_id; } // }}} @@ -458,7 +458,6 @@ */ function _retrieveLOB(&$lob) { - if (!isset($lob['handle'])) { $lob['handle'] = @ibase_blob_open($lob['ressource']); if (!$lob['handle']) { @@ -486,9 +485,9 @@ */ function _readLOB($lob, $length) { - $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; - $data = @ibase_blob_get($lob['handle'], $length); + $data = ibase_blob_get($lob['handle'], $length); if (!is_string($data)) { + $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; return $db->raiseError(MDB2_ERROR, null, null, 'Read Result LOB: ' . @ibase_errmsg()); }

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