Commit f00a5f17817ec0799647774d8459c8e91fb78c05
1 parent
8a50e226
Only try assign autofree to resultsets.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3285 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
lib/database/dbcompat.inc
| @@ -14,7 +14,9 @@ class DBCompat { | @@ -14,7 +14,9 @@ class DBCompat { | ||
| 14 | $default->log->error($this->lastResult->toString()); | 14 | $default->log->error($this->lastResult->toString()); |
| 15 | } else { | 15 | } else { |
| 16 | $this->lastInsertID = mysql_insert_id($default->_db->connection); | 16 | $this->lastInsertID = mysql_insert_id($default->_db->connection); |
| 17 | - $this->lastResult->autofree = true; | 17 | + if (is_object($this->lastResult)) { |
| 18 | + $this->lastResult->autofree = true; | ||
| 19 | + } | ||
| 18 | } | 20 | } |
| 19 | return $this->lastResult; | 21 | return $this->lastResult; |
| 20 | } | 22 | } |