From b164f515a8af609933e1724041d32ccb1de81a96 Mon Sep 17 00:00:00 2001 From: printempw Date: Mon, 11 Apr 2016 17:11:19 +0800 Subject: [PATCH] check if connection is null before close --- libraries/Database/Database.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/Database/Database.class.php b/libraries/Database/Database.class.php index 48afa936..5248c867 100644 --- a/libraries/Database/Database.class.php +++ b/libraries/Database/Database.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-02-02 21:59:06 * @Last Modified by: printempw - * @Last Modified time: 2016-04-03 15:41:40 + * @Last Modified time: 2016-04-11 17:09:09 */ namespace Database; @@ -153,7 +153,8 @@ class Database implements PasswordInterface, SyncInterface } function __destruct() { - $this->connection->close(); + if (!is_null($this->connection)) + $this->connection->close(); } }