aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-10-23 17:53:34 -0700
committerzotlabs <mike@macgirvin.com>2016-10-23 17:53:34 -0700
commit39f0707201109d7d5784e254aca320af43812ec8 (patch)
treef290675c6259dda6c55bf5fc584ce294710d76a8 /include/dba
parent8d52a278a964de86f2159441ed0cffe3add0d916 (diff)
downloadvolse-hubzilla-39f0707201109d7d5784e254aca320af43812ec8.tar.gz
volse-hubzilla-39f0707201109d7d5784e254aca320af43812ec8.tar.bz2
volse-hubzilla-39f0707201109d7d5784e254aca320af43812ec8.zip
fetch bytea as stream
Diffstat (limited to 'include/dba')
-rwxr-xr-xinclude/dba/dba_pdo.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php
index 8ba0adb99..9f8deaf17 100755
--- a/include/dba/dba_pdo.php
+++ b/include/dba/dba_pdo.php
@@ -137,8 +137,9 @@ class dba_pdo extends dba_driver {
// The initial backslash inserted by escapebin above will have been stripped
// by the postgres server, leaving us with '\x{hexdigits}'
+ // The PDO driver returns bytea fields as streams, so fetch the content with fgets
- return hex2bin(substr($str,2));
+ return hex2bin(substr(fgets($str),2));
}
else {
return $str;