1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-11 08:34:59 +02:00

drivers implementing IDibiDriver and IDibiResultDriver together do not use $resultSet in IDibiDriver part

This commit is contained in:
David Grudl
2010-11-02 14:11:03 +01:00
parent 32baabdeac
commit 087734fb23
11 changed files with 75 additions and 51 deletions

View File

@@ -115,7 +115,7 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD
{
DibiDriverException::tryError();
$resource = $this->inTransaction ? $this->transaction : $this->connection;
$this->resultSet = ibase_query($resource, $sql);
$res = ibase_query($resource, $sql);
if (DibiDriverException::catchError($msg)) {
if (ibase_errcode() == self::ERROR_EXCEPTION_THROWN) {
@@ -127,11 +127,12 @@ class DibiFirebirdDriver extends DibiObject implements IDibiDriver, IDibiResultD
}
}
if ($this->resultSet === FALSE) {
if ($res === FALSE) {
throw new DibiDriverException(ibase_errmsg(), ibase_errcode(), $sql);
}
return is_resource($this->resultSet) ? $this->createResultDriver($this->resultSet) : NULL;
} elseif (is_resource($res)) {
return $this->createResultDriver($res);
}
}