diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index f697a42..b04b7af 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -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')) {