From ed4f34272bdef9ff6fc7c29e1f45ac342aa03b5f Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 1 Mar 2016 04:20:39 +0100 Subject: [PATCH] Db: a few more PostgreSQL fixes --- library/Director/Db.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/library/Director/Db.php b/library/Director/Db.php index 44e588ad..1146531d 100644 --- a/library/Director/Db.php +++ b/library/Director/Db.php @@ -172,7 +172,7 @@ class Db extends DbConnection ) )->join( array('lt' => $smaller), - null, + '1 = 1', array() ); @@ -183,7 +183,12 @@ class Db extends DbConnection { $sql = 'SELECT * FROM director_activity_log WHERE id = ' . (int) $id; - return $this->db()->fetchRow($sql); + $result = $this->db()->fetchRow($sql); + if (is_resource($result->checksum)) { + $result->checksum = stream_get_contents($result->checksum); + } + + return $result; } public function fetchActivityLogChecksumById($id, $binary = true)