1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-07 09:16:55 +02:00

[ticket/10205] Fix remaining db drivers.

PHPBB3-10205
This commit is contained in:
Oleg Pudeyev
2012-12-04 04:50:41 -05:00
parent 1a7e2211c3
commit 9f549e8249
5 changed files with 93 additions and 43 deletions

View File

@@ -674,17 +674,27 @@ class dbal_oracle extends dbal
*/
function _sql_error()
{
$error = @ocierror();
$error = (!$error) ? @ocierror($this->query_result) : $error;
$error = (!$error) ? @ocierror($this->db_connect_id) : $error;
if ($error)
if (function_exists('ocierror'))
{
$this->last_error_result = $error;
$error = @ocierror();
$error = (!$error) ? @ocierror($this->query_result) : $error;
$error = (!$error) ? @ocierror($this->db_connect_id) : $error;
if ($error)
{
$this->last_error_result = $error;
}
else
{
$error = (isset($this->last_error_result) && $this->last_error_result) ? $this->last_error_result : array();
}
}
else
{
$error = (isset($this->last_error_result) && $this->last_error_result) ? $this->last_error_result : array();
$error = array(
'message' => $this->connect_error,
'code' => '',
);
}
return $error;