aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/dbal.php
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-02-27 15:51:23 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-02-27 15:51:23 +0000
commitf465cdd782cfb0825794fc537620687ca2d97dcb (patch)
treef9171e9179dec6ab52c86ae9240b35d67cc0ebc8 /phpBB/includes/db/dbal.php
parent05ba2058c62441f4085e71a1a984e5f1d39f3e3a (diff)
downloadforums-f465cdd782cfb0825794fc537620687ca2d97dcb.tar
forums-f465cdd782cfb0825794fc537620687ca2d97dcb.tar.gz
forums-f465cdd782cfb0825794fc537620687ca2d97dcb.tar.bz2
forums-f465cdd782cfb0825794fc537620687ca2d97dcb.tar.xz
forums-f465cdd782cfb0825794fc537620687ca2d97dcb.zip
cross-ci
git-svn-id: file:///svn/phpbb/trunk@8415 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/dbal.php')
-rw-r--r--phpBB/includes/db/dbal.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index 0444dcd816..a12b5e494e 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -45,7 +45,9 @@ class dbal
// Holding the last sql query on sql error
var $sql_error_sql = '';
-
+ // Holding the error information - only populated if sql_error_triggered is set
+ var $sql_error_returned = array();
+
// Holding transaction count
var $transactions = 0;
@@ -547,11 +549,11 @@ class dbal
$this->sql_error_triggered = true;
$this->sql_error_sql = $sql;
- $error = $this->_sql_error();
+ $this->sql_error_returned = $this->_sql_error();
if (!$this->return_on_error)
{
- $message = 'SQL ERROR [ ' . $this->sql_layer . ' ]<br /><br />' . $error['message'] . ' [' . $error['code'] . ']';
+ $message = 'SQL ERROR [ ' . $this->sql_layer . ' ]<br /><br />' . $this->sql_error_returned['message'] . ' [' . $this->sql_error_returned['code'] . ']';
// Show complete SQL error and path to administrators only
// Additionally show complete error on installation or if extended debug mode is enabled