Permalink
Browse files

Adding quoting around SET NAMES.

Fixes #2028
  • Loading branch information...
1 parent a5fe702 commit 6008e0e8a098a3d1bc5b1b82df4ff6571924aeba @markstory markstory committed Sep 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Datasource/Database/Postgres.php
@@ -769,7 +769,7 @@ public function boolean($data, $quote = false) {
* @return boolean True on success, false on failure
*/
public function setEncoding($enc) {
- if ($this->_execute('SET NAMES ?', array($enc))) {
+ if ($this->_execute("SET NAMES '?'", array($enc))) {
return true;
}
return false;

0 comments on commit 6008e0e

Please sign in to comment.