Skip to content
Snippets Groups Projects
Commit a6f64e65 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #301049 by Damien Tournoud: fix InsertQuery.

parent 1dd9ab77
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -408,11 +408,12 @@ public function execute() {
foreach ($this->insertValues as $insert_values) {
$last_insert_id = $this->connection->query($sql, $insert_values, $this->queryOptions);
}
$transaction->commit();
// Re-initialize the values array so that we can re-use this query.
$this->insertValues = array();
// Transaction commits here where $transaction looses scope.
return $last_insert_id;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment