From f5908d99d321785e88985da5c8203f20d59b41c3 Mon Sep 17 00:00:00 2001 From: Stanislas Dolcini Date: Fri, 5 Oct 2018 19:45:42 +0200 Subject: [PATCH] Make sure the connection exists before closing it --- code/web/public_php/login/class/ConnectionHandler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/web/public_php/login/class/ConnectionHandler.php b/code/web/public_php/login/class/ConnectionHandler.php index 110bb28e6..b364e9ce8 100644 --- a/code/web/public_php/login/class/ConnectionHandler.php +++ b/code/web/public_php/login/class/ConnectionHandler.php @@ -32,7 +32,9 @@ class ConnectionHandler public function __destruct() { - $db_Connection->close(); + if ($this->db_Connection != null) { + $this->db_Connection->close(); + } } private function askSalt($login, $lang)