mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10205] Avoid calling mysqli functions when mysqli is missing.
PHPBB3-10205
This commit is contained in:
parent
025a95ea90
commit
1a7e2211c3
1 changed files with 14 additions and 4 deletions
|
@ -424,12 +424,22 @@ class dbal_mysqli extends dbal
|
|||
function _sql_error()
|
||||
{
|
||||
if (!$this->db_connect_id)
|
||||
{
|
||||
if (function_exists('mysqli_connect_error'))
|
||||
{
|
||||
return array(
|
||||
'message' => @mysqli_connect_error(),
|
||||
'code' => @mysqli_connect_errno()
|
||||
'code' => @mysqli_connect_errno(),
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array(
|
||||
'message' => $this->connect_error,
|
||||
'code' => '',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return array(
|
||||
'message' => @mysqli_error($this->db_connect_id),
|
||||
|
|
Loading…
Add table
Reference in a new issue