mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 14:57:37 +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:
@@ -61,7 +61,11 @@ class mysqli extends \phpbb\db\driver\mysql_base
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->db_connect_id = mysqli_init();
|
$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 != '')
|
if ($this->db_connect_id && $this->dbname != '')
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user