From 3a60b5b67dd351b71a4b1f0626054fa2f6261208 Mon Sep 17 00:00:00 2001 From: AJ Date: Mon, 26 Aug 2024 18:37:12 +0530 Subject: [PATCH] Add files via upload fixed for php v8.2 --- ELI/classes/class.database.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ELI/classes/class.database.php b/ELI/classes/class.database.php index 9429a79..adeb489 100755 --- a/ELI/classes/class.database.php +++ b/ELI/classes/class.database.php @@ -403,6 +403,8 @@ function query($sql,$config='') { try { $conn = self::connect_db($config); + if(!empty($sql)){ + $stmt = $conn->prepare($sql); $stmt->execute(); // set the resulting array to associative @@ -417,7 +419,8 @@ function query($sql,$config='') } else { echo "0 results"; } - self::disconnect_db($config); + self::disconnect_db($config); + } } catch (PDOException $err) { self::formatError($err);