aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2008-02-27 15:50:36 +0000
committerHenry Sudhof <kellanved@phpbb.com>2008-02-27 15:50:36 +0000
commit752b452128edecc51f7db8f7ee1875f29380b42a (patch)
tree627882bacc5bef8041ed2c42d4fde0bf5109aa61 /phpBB/includes/db
parent540879ae41c5f58e693350d8af8c005380417aa3 (diff)
downloadforums-752b452128edecc51f7db8f7ee1875f29380b42a.tar
forums-752b452128edecc51f7db8f7ee1875f29380b42a.tar.gz
forums-752b452128edecc51f7db8f7ee1875f29380b42a.tar.bz2
forums-752b452128edecc51f7db8f7ee1875f29380b42a.tar.xz
forums-752b452128edecc51f7db8f7ee1875f29380b42a.zip
DBAL extension motivated by #22125
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8414 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db')
-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 4964ac87f7..61344a0674 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;
@@ -544,11 +546,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