Fix
This commit is contained in:
parent
29d1538d68
commit
07f564ada9
1 changed files with 7 additions and 6 deletions
|
@ -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 {
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue