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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user