1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

Merge pull request #2660 from marc1706/ticket/12764

[ticket/12764] Properly handle errors upon connecting to MySQLi database

* marc1706/ticket/12764:
  [ticket/12764] Properly handle errors upon connecting to MySQLi database
This commit is contained in:
Joas Schilling 2014-06-27 15:39:07 +02:00
commit 919e1a6bc8

View File

@ -61,7 +61,11 @@ class mysqli extends \phpbb\db\driver\mysql_base
}
$this->db_connect_id = mysqli_init();
@mysqli_real_connect($this->db_connect_id, $this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket, MYSQLI_CLIENT_FOUND_ROWS);
if (!@mysqli_real_connect($this->db_connect_id, $this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket, MYSQLI_CLIENT_FOUND_ROWS))
{
$this->db_connect_id = '';
}
if ($this->db_connect_id && $this->dbname != '')
{