SQL-DATABASE ERROR

Database error in WoltLab Burning Board (2.3.6): Invalid SQL: SELECT i.iconpath, i.icontitle, p.*, t.* FROM bb1_threads t LEFT JOIN bb1_icons i ON (t.iconid=i.iconid) LEFT JOIN bb1_posts p ON (p.threadid=t.threadid) WHERE t.boardid='67' AND p.visible=1 GROUP by t.threadid ORDER BY t.starttime DESC LIMIT 1
mysql error: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'eh_base.p.postid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
mysql error number: 1055
mysql version: 5.7.18-0ubuntu0.16.04.1
php version: 5.2.17
Date: 23.10.2017 @ 04:39
Script: /forum/portal.php?sid=00416e0daaa38479ceaa65b665cb0f53
Referer: