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
|
@ -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(
|
||||||
|
|
Loading…
Add table
Reference in a new issue