mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Checking for resource before closing MySQL connection
This commit is contained in:
parent
c35dc508cb
commit
8b4311f020
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user