From 9fffea505f38ab574fcccf058d770554e054a0e2 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 23 Dec 2015 17:18:10 -0800 Subject: [PATCH] web: remote "@" before mysql_connect calls --- html/inc/db.inc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/html/inc/db.inc b/html/inc/db.inc index 4a2824d6e9..d2113ec742 100644 --- a/html/inc/db.inc +++ b/html/inc/db.inc @@ -49,7 +49,7 @@ if (MYSQLI) { } else { $port = null; } - $mysqli = @new mysqli($host, $user, $pass, $dbname, $port); + $mysqli = new mysqli($host, $user, $pass, $dbname, $port); return $mysqli; } function _mysql_query($q) { @@ -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; @@ -191,14 +191,14 @@ function db_init_aux($try_replica=false) { return 1; } } else { - $link = mysql_pconnect($host, $user, $pass); - if (!$link) { - return 1; - } - if (!mysql_select_db($db_name, $link)) { - echo "selecting $db_name\n"; - return 2; - } + $link = mysql_pconnect($host, $user, $pass); + if (!$link) { + return 1; + } + if (!mysql_select_db($db_name, $link)) { + echo "selecting $db_name\n"; + return 2; + } } return 0;