mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX Renamed MSSQLQuery::destroy() renamed to destruct() so that it is called properly after the object is destroyed
This commit is contained in:
parent
35d04ac387
commit
ae1494c313
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user