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;
}
public function __destroy() {
if($this->mssql) {
mssql_free_result($this->handle);
} else {
sqlsrv_free_stmt($this->handle);
public function __destruct() {
if(is_resource($this->handle)) {
if($this->mssql) {
mssql_free_result($this->handle);
} else {
sqlsrv_free_stmt($this->handle);
}
}
}