Db: do not let the db adapter handle binary...

...data as this causes problems with Postgres and quoteBinary
This commit is contained in:
Thomas Gelf 2016-10-09 13:47:37 +00:00
parent 38eaf4036b
commit 82c5b10eef

View File

@ -244,6 +244,8 @@ class Db extends DbConnection
public function fetchActivityLogEntry($checksum) public function fetchActivityLogEntry($checksum)
{ {
$db = $this->db();
$sql = 'SELECT id, object_type, object_name, action_name,' $sql = 'SELECT id, object_type, object_name, action_name,'
. ' old_properties, new_properties, author, change_time,' . ' old_properties, new_properties, author, change_time,'
. ' %s AS checksum, %s AS parent_checksum' . ' %s AS checksum, %s AS parent_checksum'
@ -255,9 +257,8 @@ class Db extends DbConnection
$this->dbHexFunc('parent_checksum') $this->dbHexFunc('parent_checksum')
); );
return $this->db()->fetchRow( return $db->fetchRow(
$sql, $db->quoteInto($sql, $this->quoteBinary(Util::hex2binary($checksum)))
$this->quoteBinary(Util::hex2binary($checksum))
); );
} }