Better fix

This commit is contained in:
Laurent Destailleur 2012-07-23 11:02:53 +02:00 committed by Regis Houssin
parent 01ab1aa66f
commit b63505ff15

View File

@ -380,7 +380,7 @@ class DoliDBPgsql
if (! $name) $name="postgres"; // When try to connect using admin user
// try first Unix domain socket (local)
if ((empty($host) || $host == "socket") && ! defined('NOLOCALSOCKETPGCONNECT'))
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);