1
0
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:
Oleg Pudeyev 2011-03-07 09:09:40 -05:00
parent 7acbf98692
commit 020d06cdaa

View File

@ -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() : '')
); );
} }