Skip to content
Snippets Groups Projects
Commit 1d39c1ac authored by Marcos García de La Fuente's avatar Marcos García de La Fuente
Browse files

Fix: [ bug #1768 ] PHP Warning when error connecting to a PostgreSQL server in install script

parent 1c2c1ff3
No related branches found
No related tags found
No related merge requests found
......@@ -402,7 +402,7 @@ class DoliDBPgsql extends DoliDB
if ((! empty($host) && $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT'))
{
$con_string = "dbname='".$name."' user='".$login."' password='".$passwd."'"; // $name may be empty
$this->db = pg_connect($con_string);
$this->db = @pg_connect($con_string);
}
// if local connection failed or not requested, use TCP/IP
......@@ -412,7 +412,7 @@ class DoliDBPgsql extends DoliDB
if (! $port) $port = 5432;
$con_string = "host='".$host."' port='".$port."' dbname='".$name."' user='".$login."' password='".$passwd."'";
$this->db = pg_connect($con_string);
$this->db = @pg_connect($con_string);
}
// now we test if at least one connect method was a success
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment