From 4665369e317221e678eac350ba052eca661fe74e Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 19 Oct 2010 05:08:59 +0000 Subject: [PATCH] BUGFIX Renamed MySQLQuery::__destroy() renamed to __destruct() so that it is called properly after the object is destroyed (from r112288) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112950 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/MySQLDatabase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/model/MySQLDatabase.php b/core/model/MySQLDatabase.php index 5c179662f..635004923 100755 --- a/core/model/MySQLDatabase.php +++ b/core/model/MySQLDatabase.php @@ -1058,8 +1058,8 @@ class MySQLQuery extends SS_Query { $this->handle = $handle; } - public function __destroy() { - mysql_free_result($this->handle); + public function __destruct() { + if(is_resource($this->handle)) mysql_free_result($this->handle); } public function seek($row) {