From d1a024d7b1c16cbe13a466717313fde1888bb718 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 14 Oct 2010 05:07:55 +0000 Subject: [PATCH] BUGFIX Renamed SQLite3Query::destroy() renamed to destruct() so that it is called properly after the object is destroyed --- code/SQLite3Database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/SQLite3Database.php b/code/SQLite3Database.php index e2a48fe..05b6b6a 100644 --- a/code/SQLite3Database.php +++ b/code/SQLite3Database.php @@ -1208,8 +1208,8 @@ class SQLite3Query extends SS_Query { $this->handle = $handle; } - public function __destroy() { - $this->handle->finalize(); + public function __destruct() { + if($this->handle) $this->handle->finalize(); } public function seek($row) { @@ -1247,4 +1247,4 @@ class SQLite3Query extends SS_Query { return false; } } -} \ No newline at end of file +}