From 0f41abae1d043aaaa98139a4ba7ffd23b95011ad Mon Sep 17 00:00:00 2001 From: leigh-ols Date: Fri, 2 Jun 2017 09:17:30 +0100 Subject: [PATCH] Remove __destructor from MysqliDb Allow garbage collection to close mysqli instance connection, instead of closing it in the destructor. --- MysqliDb.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/MysqliDb.php b/MysqliDb.php index 19d3d55b..a3c28a85 100644 --- a/MysqliDb.php +++ b/MysqliDb.php @@ -1848,23 +1848,6 @@ protected function _prepareQuery() return $stmt; } - /** - * Close connection - * - * @return void - */ - public function __destruct() - { - if ($this->isSubQuery) { - return; - } - - if ($this->_mysqli) { - $this->_mysqli->close(); - $this->_mysqli = null; - } - } - /** * Referenced data array is required by mysqli since PHP 5.3+ *