瀏覽代碼

Merge branch 'bug-1768' of https://github.com/marcosgdf/dolibarr into marcosgdf-bug-1768

Laurent Destailleur 10 年之前
父節點
當前提交
77e48f8c3e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      htdocs/core/db/pgsql.class.php

+ 2 - 2
htdocs/core/db/pgsql.class.php

@@ -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