BUGFIX Ensure that dbConn is a resource before attempting to close it

This commit is contained in:
Sean Harvey 2009-07-23 04:45:16 +00:00
parent 8b3f4f9963
commit 915457b86b

View File

@ -95,7 +95,7 @@ class MSSQLDatabase extends Database {
}
public function __destruct() {
if($this->dbConn) {
if(is_resource($this->dbConn)) {
if(function_exists('mssql_close')) {
mssql_close($this->dbConn);
} elseif(function_exists('sqlsrv_close')) {