From 07f564ada969948ef900d0291a684eca06a7e38e Mon Sep 17 00:00:00 2001 From: Airikr Date: Wed, 24 Jul 2024 20:19:31 +0200 Subject: [PATCH] Fix --- site-settings.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/site-settings.php b/site-settings.php index 2d2e0e8..a0cc05f 100755 --- a/site-settings.php +++ b/site-settings.php @@ -40,16 +40,17 @@ - if(!empty($database_host) AND !empty($database_port) AND !empty($database_name) AND !empty($database_user) AND !empty($database_pass)) { - try { + try { + $sql = null; + if($sql === null) { $sql = new PDO('pgsql:host='.$database_host.';port='.$database_port.';dbname='.$database_name.';user='.$database_user.';password='.$database_pass); $sql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } + } - catch(PDOException $e) { - echo $e; - exit; - } + catch(PDOException $e) { + echo $e; + exit; } ?>