issue #606, postgres binary data handling under PDO and HHVM when passed null

This commit is contained in:
zotlabs 2016-11-30 19:45:46 -08:00
parent abf1d7da23
commit 83a4999dbe

View file

@ -133,7 +133,7 @@ class dba_pdo extends dba_driver {
}
function unescapebin($str) {
if($this->driver_dbtype === 'pgsql') {
if($this->driver_dbtype === 'pgsql' && (! is_null($str))) {
$x = '';
while(! feof($str)) {
$x .= fread($str,8192);