mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 07:47:34 +02:00
[ticket/10205] Avoid calling mysqli functions when mysqli is missing.
PHPBB3-10205
This commit is contained in:
@@ -424,12 +424,22 @@ class dbal_mysqli extends dbal
|
|||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
if (!$this->db_connect_id)
|
if (!$this->db_connect_id)
|
||||||
|
{
|
||||||
|
if (function_exists('mysqli_connect_error'))
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'message' => @mysqli_connect_error(),
|
'message' => @mysqli_connect_error(),
|
||||||
'code' => @mysqli_connect_errno()
|
'code' => @mysqli_connect_errno(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'message' => $this->connect_error,
|
||||||
|
'code' => '',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'message' => @mysqli_error($this->db_connect_id),
|
'message' => @mysqli_error($this->db_connect_id),
|
||||||
|
Reference in New Issue
Block a user