SQL-DATABASE ERROR

Database error in WoltLab Burning Board (2.3.6): Invalid SQL: SELECT * FROM bb1_jgs_galerie_bilder WHERE kategorie IN (0,1,2,3,11,5,6,7,9,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,27,29,30,31,32,33,34,35,37,44,45,46,47) AND kategorie = '24' AND gesperrt = '0' ORDER BY bild_id ASC LIMIT -7, 7
mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-7, 7' at line 1
mysql error number: 1064
mysql version: 5.5.62-0ubuntu0.14.04.1
php version: 5.5.9-1ubuntu4.29
Date: 20.06.2019 @ 08:53
Script: /jgs_galerie_userbilder.php?kategorie=24&bildid=1022
Referer: