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