mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 15:05:37 +00:00
Finalize only if db is available
Fixes https://github.com/silverstripe/silverstripe-sqlite3/issues/77
This commit is contained in:
parent
1e8d7357be
commit
722490c406
@ -39,7 +39,7 @@ class SQLite3Query extends Query
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
if ($this->handle) {
|
||||
if ($this->handle && $this->database->getSelectedDatabase()) {
|
||||
$this->handle->finalize();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user