aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/mysql4.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/mysql4.php')
-rw-r--r--phpBB/includes/db/mysql4.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php
index ac5b9552fc..041e148c11 100644
--- a/phpBB/includes/db/mysql4.php
+++ b/phpBB/includes/db/mysql4.php
@@ -96,6 +96,12 @@ class sql_db
$result = @mysqli_commit($this->db_connect_id);
@mysqli_autocommit($this->db_connect_id, true);
$this->transaction = false;
+
+ if (!$result)
+ {
+ @mysqli_rollback($this->db_connect_id);
+ @mysqli_autocommit($this->db_connect_id, true);
+ }
break;
case 'rollback':
@@ -290,13 +296,15 @@ class sql_db
unset($this->rowset[$cur_index]);
unset($this->row[$cur_index]);
-
+
+ $result = array();
while ($this->rowset[$cur_index] = $this->sql_fetchrow($query_id))
{
$result[] = $this->rowset[$cur_index];
}
return $result;
}
+
return false;
}