Commit 25747314 authored by Dries's avatar Dries
Browse files

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

parent 80bbf2af
......@@ -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;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment