diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-03 09:43:31 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-02-03 09:43:31 +0000 |
commit | 129218286b21a19d0bf8b79aef373e9630e5bc82 (patch) | |
tree | b15f0cb51d06cb06c5f343e357db6c94f2c48371 /phpBB/includes/db/sqlite.php | |
parent | 40931f12ba11c9fcfe6fae289f00ec689aa455b6 (diff) | |
download | forums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar forums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar.gz forums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar.bz2 forums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar.xz forums-129218286b21a19d0bf8b79aef373e9630e5bc82.zip |
show correct SQL error message if failed during a transaction...
git-svn-id: file:///svn/phpbb/trunk@4788 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/sqlite.php')
-rw-r--r-- | phpBB/includes/db/sqlite.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php index b1de116ed8..b34fded3cb 100644 --- a/phpBB/includes/db/sqlite.php +++ b/phpBB/includes/db/sqlite.php @@ -363,15 +363,16 @@ class sql_db { if (!$this->return_on_error) { - if ($this->transaction) - { - $this->sql_transaction('rollback'); - } - $this_page = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF']; $this_page .= '&' . ((!empty($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : $_ENV['QUERY_STRING']); $message = '<u>SQL ERROR</u> [ ' . SQL_LAYER . ' ]<br /><br />' . @sqlite_error_string(@sqlite_last_error($this->db_connect_id)) . '<br /><br /><u>CALLING PAGE</u><br /><br />' . htmlspecialchars($this_page) . (($sql != '') ? '<br /><br /><u>SQL</u><br /><br />' . $sql : '') . '<br />'; + + if ($this->transaction) + { + $this->sql_transaction('rollback'); + } + trigger_error($message, E_USER_ERROR); } |