mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17455] Fix PHP warning on MySQLi connection failure
PHPBB-17455
This commit is contained in:
parent
5c7cbbc6a8
commit
7540720c79
1 changed files with 2 additions and 2 deletions
|
@ -63,10 +63,10 @@ class mysqli extends \phpbb\db\driver\mysql_base
|
|||
|
||||
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 = '';
|
||||
$this->connect_error = 'Failed to establish a connection to the MySQL database engine. Please ensure MySQL server is running and the database configuration parameters are correct.';
|
||||
}
|
||||
|
||||
if ($this->db_connect_id && $this->dbname != '')
|
||||
if (!$this->connect_error && $this->db_connect_id && $this->dbname != '')
|
||||
{
|
||||
// Disable loading local files on client side
|
||||
@mysqli_options($this->db_connect_id, MYSQLI_OPT_LOCAL_INFILE, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue