From f00a5f17817ec0799647774d8459c8e91fb78c05 Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Tue, 24 May 2005 20:28:21 +0000 Subject: [PATCH] Only try assign autofree to resultsets. --- lib/database/dbcompat.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/database/dbcompat.inc b/lib/database/dbcompat.inc index 81b6ac4..049ecfd 100644 --- a/lib/database/dbcompat.inc +++ b/lib/database/dbcompat.inc @@ -14,7 +14,9 @@ class DBCompat { $default->log->error($this->lastResult->toString()); } else { $this->lastInsertID = mysql_insert_id($default->_db->connection); - $this->lastResult->autofree = true; + if (is_object($this->lastResult)) { + $this->lastResult->autofree = true; + } } return $this->lastResult; } -- libgit2 0.21.4