BUGFIX Renamed MSSQLQuery::destroy() renamed to destruct() so that it is called properly after the object is destroyed

This commit is contained in:
Sean Harvey 2010-10-14 05:03:01 +00:00
parent 35d04ac387
commit ae1494c313

View File

@ -1595,11 +1595,13 @@ class MSSQLQuery extends SS_Query {
$this->mssql = $mssql; $this->mssql = $mssql;
} }
public function __destroy() { public function __destruct() {
if($this->mssql) { if(is_resource($this->handle)) {
mssql_free_result($this->handle); if($this->mssql) {
} else { mssql_free_result($this->handle);
sqlsrv_free_stmt($this->handle); } else {
sqlsrv_free_stmt($this->handle);
}
} }
} }