Checking for resource before closing MySQL connection

This commit is contained in:
assertchris 2016-07-07 10:01:33 +12:00
parent c35dc508cb
commit 8b4311f020

View File

@ -96,7 +96,7 @@ class MySQLiConnector extends DBConnector {
} }
public function __destruct() { public function __destruct() {
if ($this->dbConn) { if (is_resource($this->dbConn)) {
mysqli_close($this->dbConn); mysqli_close($this->dbConn);
$this->dbConn = null; $this->dbConn = null;
} }