summaryrefslogtreecommitdiff
path: root/classes/Misc.php
diff options
context:
space:
mode:
authorRobert Treat2013-03-26 17:56:45 +0000
committerRobert Treat2013-03-26 17:56:45 +0000
commitc724073960af20805c60d873d94a0c38de958847 (patch)
treef0ff02d5fcd299a229a7b5503834ca065d91c114 /classes/Misc.php
parente7c81cfb4b89398d6accbd2b0f0af3c8507c9666 (diff)
Fix incorrect modification of bytea data when updating rows that contain bytea columns.
Based on the POC patch from ioguix. This fixes SF Bug # 3243916.
Diffstat (limited to 'classes/Misc.php')
-rw-r--r--classes/Misc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/Misc.php b/classes/Misc.php
index a9b7d685..0457b4d8 100644
--- a/classes/Misc.php
+++ b/classes/Misc.php
@@ -505,6 +505,10 @@
/* we work on UTF-8 only encoding */
$data->execute("SET client_encoding TO 'UTF-8'");
+ if ($data->hasByteaHexDefault()) {
+ $data->execute("SET bytea_output TO escape");
+ }
+
return $data;
}