From 83a4999dbee17262e6f14cec6cda220e07b88c0e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 30 Nov 2016 19:45:46 -0800 Subject: issue #606, postgres binary data handling under PDO and HHVM when passed null --- include/dba/dba_pdo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dba/dba_pdo.php b/include/dba/dba_pdo.php index e235c467b..f76e6cdd7 100755 --- a/include/dba/dba_pdo.php +++ b/include/dba/dba_pdo.php @@ -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); -- cgit v1.2.3