mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-25 04:23:38 +01:00
[ticket/10057] Handle the case of missing interbase extension better.
PHPBB3-10057
This commit is contained in:
parent
7acbf98692
commit
020d06cdaa
@ -498,8 +498,24 @@ class dbal_firebird extends dbal
|
|||||||
*/
|
*/
|
||||||
function _sql_error()
|
function _sql_error()
|
||||||
{
|
{
|
||||||
|
// Need special handling here because ibase_errmsg returns
|
||||||
|
// connection errors, however if the interbase extension
|
||||||
|
// is not installed then ibase_errmsg does not exist and
|
||||||
|
// we cannot call it.
|
||||||
|
if (function_exists('ibase_errmsg'))
|
||||||
|
{
|
||||||
|
$msg = @ibase_errmsg();
|
||||||
|
if (!$msg)
|
||||||
|
{
|
||||||
|
$msg = $this->connect_error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$msg = $this->connect_error;
|
||||||
|
}
|
||||||
return array(
|
return array(
|
||||||
'message' => @ibase_errmsg(),
|
'message' => $msg,
|
||||||
'code' => (@function_exists('ibase_errcode') ? @ibase_errcode() : '')
|
'code' => (@function_exists('ibase_errcode') ? @ibase_errcode() : '')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user