From 15ac87749c6fe6bd346e1c9b4d72b802c0f3d222 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 6 Aug 2015 10:46:59 -0700 Subject: [PATCH] web: suppress mysql connect warnings --- html/inc/db.inc | 2 +- html/inc/db_conn.inc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html/inc/db.inc b/html/inc/db.inc index b0597cdf0c..6fc14bb1b0 100644 --- a/html/inc/db.inc +++ b/html/inc/db.inc @@ -110,7 +110,7 @@ if (MYSQLI) { } } else { function _mysql_connect($host, $user, $pass, $db_name) { - $link = mysql_pconnect($host, $user, $pass); + $link = @mysql_pconnect($host, $user, $pass); if (!$link) return null; if (!mysql_select_db($db_name, $link)) { return null; diff --git a/html/inc/db_conn.inc b/html/inc/db_conn.inc index d12106c0e3..5e96858720 100644 --- a/html/inc/db_conn.inc +++ b/html/inc/db_conn.inc @@ -36,9 +36,9 @@ class DbConn { } //if (version_compare(PHP_VERSION, '5.3.0') < 0) { if (1) { // don't use persistent connections for now - $this->db_conn = new mysqli($host, $user, $passwd, $name, $port); + $this->db_conn = @new mysqli($host, $user, $passwd, $name, $port); } else { - $this->db_conn = new mysqli("p:".$host, $user, $passwd, $name, $port); + $this->db_conn = @new mysqli("p:".$host, $user, $passwd, $name, $port); } global $mysqli; $mysqli = $this->db_conn;