1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +02:00

drivers: getResource() and getResultResource() checks if resource is alive

This commit is contained in:
David Grudl
2012-01-19 03:02:36 +01:00
parent c7b9a91fc2
commit 660a9db522
11 changed files with 30 additions and 28 deletions

View File

@@ -144,7 +144,7 @@ class DibiConnection extends DibiObject
public function __destruct()
{
// disconnects and rolls back transaction - do not rely on auto-disconnect and rollback!
$this->connected && $this->disconnect();
$this->connected && $this->driver->getResource() && $this->disconnect();
}