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

From: Date: Thu, 23 Feb 2006 18:38:11 +0000
Subject: cvs: pear /MDB2/MDB2/Driver ibase.php /MDB2/MDB2/Driver/Datatype ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38533@lists.php.net to get a copy of this message
lsmith Thu Feb 23 18:38:11 2006 UTC Modified files: /pear/MDB2/MDB2/Driver/Datatype ibase.php /pear/MDB2/MDB2/Driver ibase.php Log: - silence a number of extension API calls - ensure we have a connection in beginTransaction() http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/Datatype/ibase.php?r1=1.60&r2=1.61&diff_format=u Index: pear/MDB2/MDB2/Driver/Datatype/ibase.php diff -u pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.60 pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.61 --- pear/MDB2/MDB2/Driver/Datatype/ibase.php:1.60 Tue Feb 14 08:02:33 2006 +++ pear/MDB2/MDB2/Driver/Datatype/ibase.php Thu Feb 23 18:38:11 2006 @@ -44,7 +44,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.60 2006/02/14 08:02:33 lsmith Exp $ +// $Id: ibase.php,v 1.61 2006/02/23 18:38:11 lsmith Exp $ require_once 'MDB2/Driver/Datatype/Common.php'; @@ -238,7 +238,7 @@ */ function _readLOB($lob, $length) { - $data = ibase_blob_get($lob['handle'], $length); + $data = @ibase_blob_get($lob['handle'], $length); if (!is_string($data)) { $db =& $this->getDBInstance(); if (PEAR::isError($db)) { http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2/Driver/ibase.php?r1=1.136&r2=1.137&diff_format=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.136 pear/MDB2/MDB2/Driver/ibase.php:1.137 --- pear/MDB2/MDB2/Driver/ibase.php:1.136 Mon Feb 20 14:14:27 2006 +++ pear/MDB2/MDB2/Driver/ibase.php Thu Feb 23 18:38:11 2006 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.136 2006/02/20 14:14:27 lsmith Exp $ +// $Id: ibase.php,v 1.137 2006/02/23 18:38:11 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -265,7 +265,11 @@ if ($this->in_transaction) { return MDB2_OK; //nothing to do } - $result = ibase_trans(); + $connection = $this->getConnection(); + if (PEAR::isError($connection)) { + return $connection; + } + $result = @ibase_trans(IBASE_DEFAULT, $connection); if (!$result) { return $this->raiseError(MDB2_ERROR, null, null, 'beginTransaction: could not start a transaction'); @@ -292,7 +296,7 @@ return $this->raiseError(MDB2_ERROR, null, null, 'commit: transaction changes are being auto committed'); } - if (!ibase_commit($this->transaction_id)) { + if (!@ibase_commit($this->transaction_id)) { return $this->raiseError(MDB2_ERROR, null, null, 'commit: could not commit a transaction'); } @@ -318,9 +322,9 @@ return $this->raiseError(MDB2_ERROR, null, null, 'rollback: transactions can not be rolled back when changes are auto committed'); } - if ($this->transaction_id && !ibase_rollback($this->transaction_id)) { + if ($this->transaction_id && !@ibase_rollback($this->transaction_id)) { return $this->raiseError(MDB2_ERROR, null, null, - 'rollback: Could not rollback a pending transaction: '.ibase_errmsg()); + 'rollback: Could not rollback a pending transaction: '.@ibase_errmsg()); } $this->in_transaction = false; $this->transaction_id = 0; @@ -488,7 +492,7 @@ return $connection; } } - $result = ibase_query($connection, $query); + $result = @ibase_query($connection, $query); if ($result === false) { return $this->raiseError(); @@ -516,7 +520,7 @@ return $connection; } } - return (function_exists('ibase_affected_rows') ? ibase_affected_rows($connection) : 0); + return (function_exists('ibase_affected_rows') ? @ibase_affected_rows($connection) : 0); } // }}} @@ -550,9 +554,9 @@ */ function getServerVersion($native = false) { - $ibserv = ibase_service_attach($this->dsn['hostspec'], $this->options['DBA_username'], $this->options['DBA_password']); - $server_info = ibase_server_info($ibserv, IBASE_SVC_SERVER_VERSION); - ibase_service_detach($ibserv); + $ibserv = @ibase_service_attach($this->dsn['hostspec'], $this->options['DBA_username'], $this->options['DBA_password']); + $server_info = @ibase_server_info($ibserv, IBASE_SVC_SERVER_VERSION); + @ibase_service_detach($ibserv); if (!$native) { //WI-V1.5.3.4854 Firebird 1.5 if (!preg_match('/-V([\d\.]*)/', $server_info, $matches)) { @@ -1209,7 +1213,7 @@ $parameters[] = $this->db->quote($value, $type, false); } - $result = call_user_func_array('ibase_execute', $parameters); + $result = @call_user_func_array('ibase_execute', $parameters); if ($result === false) { $err =& $this->db->raiseError(); return $err;

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