mirror of https://github.com/BOINC/boinc.git
database: report connection failure in _mysql_connect()
This is used in the upgrade script and some old web pages. You need to check $mysql->connect_errno after doing new mysqli
This commit is contained in:
parent
d8fe23b3c2
commit
7fb55d67a8
|
@ -48,6 +48,9 @@ if (MYSQLI) {
|
|||
$port = null;
|
||||
}
|
||||
$mysqli = @new mysqli($host, $user, $pass, $dbname, $port);
|
||||
if ($mysqli->connect_errno) {
|
||||
return null;
|
||||
}
|
||||
return $mysqli;
|
||||
}
|
||||
function _mysql_query($q) {
|
||||
|
|
Loading…
Reference in New Issue