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; } ?>