Skip to content

Commit

Permalink
Adding quoting around SET NAMES.
Browse files Browse the repository at this point in the history
Fixes #2028
  • Loading branch information
markstory committed Sep 27, 2011
1 parent a5fe702 commit 6008e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/Database/Postgres.php
Expand Up @@ -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;
Expand Down

0 comments on commit 6008e0e

Please sign in to comment.