Skip to content

Commit

Permalink
Merge pull request #5760 from BOINC/dpa_dbconn2
Browse files Browse the repository at this point in the history
database: report connection failure in _mysql_connect()
  • Loading branch information
AenBleidd authored Aug 16, 2024
2 parents d8fe23b + 7fb55d6 commit 161cfb9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions html/inc/db.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 161cfb9

Please sign in to comment.