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

- Patch #550010 by c960657: DatabaseConnection::prepareQuery() ignores argument.

parent 80bbf2af
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
......@@ -455,11 +455,17 @@ public function prefixTables($sql) {
*/
public function prepareQuery($query, $cache = TRUE) {
$query = $this->prefixTables($query);
if (empty($this->preparedStatements[$query])) {
if (isset($this->preparedStatements[$query])) {
$stmt = $this->preparedStatements[$query];
}
else {
// Call PDO::prepare.
$this->preparedStatements[$query] = parent::prepare($query);
$stmt = parent::prepare($query);
if ($cache) {
$this->preparedStatements[$query] = $stmt;
}
}
return $this->preparedStatements[$query];
return $stmt;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment