diff --git a/lib/Db/ShareRequestMapper.php b/lib/Db/ShareRequestMapper.php index 22a69b63..aa27b090 100644 --- a/lib/Db/ShareRequestMapper.php +++ b/lib/Db/ShareRequestMapper.php @@ -43,7 +43,9 @@ class ShareRequestMapper extends Mapper { * @return ShareRequest[] */ public function getRequestsByItemGuidGroupedByUser($item_guid){ - $this->db->executeQuery("SET sql_mode = '';"); + if (strtolower($this->db->getDatabasePlatform()->getName()) === 'mysql'){ + $this->db->executeQuery("SET sql_mode = '';"); + } $q = "SELECT *, target_user_id FROM *PREFIX*" . self::TABLE_NAME . " WHERE item_guid = ? GROUP BY target_user_id;"; return $this->findEntities($q, [$item_guid]); }