Debug install v16 with php 8.1

This commit is contained in:
Laurent Destailleur
2022-07-04 03:06:56 +02:00
parent e4e0bdbe96
commit de71df9df2
4 changed files with 26 additions and 11 deletions

View File

@@ -419,7 +419,11 @@ class DoliDBPgsql extends DoliDB
// try first Unix domain socket (local)
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);
try {
$this->db = @pg_connect($con_string);
} catch (Exception $e) {
// No message
}
}
// if local connection failed or not requested, use TCP/IP