From de1c8cb18b8833da55e529010d3ab8f570c7aad3 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Sun, 12 Sep 2010 09:20:17 +0000 Subject: [PATCH] BUGFIX Fixed non-object error in SQLitePDODatabase when database can't be written to (exposes better error) --- code/SQLitePDODatabase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/SQLitePDODatabase.php b/code/SQLitePDODatabase.php index 9fc94d7..395a386 100644 --- a/code/SQLitePDODatabase.php +++ b/code/SQLitePDODatabase.php @@ -120,7 +120,7 @@ class SQLitePDOQuery extends SQLite3Query { } public function __destruct() { - $this->handle->closeCursor(); + if($this->handle) $this->handle->closeCursor(); } public function __destroy() { @@ -174,4 +174,4 @@ class ResultRow { function get() { return $this->_datamap; } -} \ No newline at end of file +}