fetch bytea as stream

This commit is contained in:
zotlabs 2016-10-23 17:53:34 -07:00
parent 8d52a278a9
commit 39f0707201

View File

@ -137,8 +137,9 @@ class dba_pdo extends dba_driver {
// The initial backslash inserted by escapebin above will have been stripped // The initial backslash inserted by escapebin above will have been stripped
// by the postgres server, leaving us with '\x{hexdigits}' // 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 { else {
return $str; return $str;