From fb1c5e22f6ac1cad6ddf9b6421bf21c00a95ae0c Mon Sep 17 00:00:00 2001
From: Meik Sievertsen <acydburn@phpbb.com>
Date: Tue, 29 Jan 2008 15:00:41 +0000
Subject: #17025

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8346 89ea8834-ac86-4346-8a33-228a782c2dd0
---
 phpBB/includes/db/dbal.php | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'phpBB/includes')

diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index e37ccda0db..4964ac87f7 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -262,6 +262,13 @@ class dbal
 					return true;
 				}
 
+				// Check if there is a transaction (no transaction can happen if there was an error, with a combined rollback and error returning enabled)
+				// This implies we have transaction always set for autocommit db's
+				if (!$this->transaction)
+				{
+					return false;
+				}
+
 				$result = $this->_sql_transaction('commit');
 
 				if (!$result)
-- 
cgit v1.2.1