From 752b452128edecc51f7db8f7ee1875f29380b42a Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Wed, 27 Feb 2008 15:50:36 +0000 Subject: DBAL extension motivated by #22125 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8414 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/dbal.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/db') 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 . ' ]

' . $error['message'] . ' [' . $error['code'] . ']'; + $message = 'SQL ERROR [ ' . $this->sql_layer . ' ]

' . $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 -- cgit v1.2.1