From 82c5b10eefd25415fa80de68ff0e7b4b7179b20c Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 9 Oct 2016 13:47:37 +0000 Subject: [PATCH] Db: do not let the db adapter handle binary... ...data as this causes problems with Postgres and quoteBinary --- library/Director/Db.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/Director/Db.php b/library/Director/Db.php index abfc7cfd..0f4a87db 100644 --- a/library/Director/Db.php +++ b/library/Director/Db.php @@ -244,6 +244,8 @@ class Db extends DbConnection public function fetchActivityLogEntry($checksum) { + $db = $this->db(); + $sql = 'SELECT id, object_type, object_name, action_name,' . ' old_properties, new_properties, author, change_time,' . ' %s AS checksum, %s AS parent_checksum' @@ -255,9 +257,8 @@ class Db extends DbConnection $this->dbHexFunc('parent_checksum') ); - return $this->db()->fetchRow( - $sql, - $this->quoteBinary(Util::hex2binary($checksum)) + return $db->fetchRow( + $db->quoteInto($sql, $this->quoteBinary(Util::hex2binary($checksum))) ); }