FATAL ERROR: DATABASE ERROR: Couldn't run query: SELECT `File`.ID, `File`.ClassName, `File`.Created, `File`.LastEdited, `File`.Name, `File`.Title, `File`.Content, `File`.ParentID, `File`.Filename, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName, `File`.PopupWidth, `File`.PopupHeight, `File`.Embed, `File`.LimitDimensions FROM `File` WHERE (`Filename` REGEXP '[.](png|jpg|jpeg|gif)$' AND `ParentID` = '18') ORDER BY `File`.`Title` ASC LIMIT ,30 | 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 '30' at line 1
At line 431 in C:\wamp\www\silverstripe-v2.2.2\sapphire\core\model\Database.php
Thats how that lines 365 -> currently 368 should work - added the isset round the $_REQUEST then also if MediaPerPage isnt defined (which Im guessing its not in your case) we want it to not throw that giant error so we can give it a value to use.
So basically what its doing at the moment is that if start is defined as a int use it else it is 0. So ignore that last piece of code. What we want to do is 1st check start exists, then if start exists check if its a numeric number. Probably a cleaner way to do this but however