Ensure start var is not a negative number

This commit is contained in:
3Dgoo 2022-03-28 06:33:54 +10:30 committed by Daniel Hensby
parent 101b17f16e
commit ceeed65465
No known key found for this signature in database
GPG Key ID: D8DEBC4C8E7BC8B9

View File

@ -163,7 +163,7 @@ class SearchForm extends Form
$keywords = $this->addStarsToKeywords($keywords);
$pageLength = $this->getPageLength();
$start = $request->requestVar('start') ?: 0;
$start = max(0, (int)$request->requestVar('start'));
$booleanSearch =
strpos($keywords, '"') !== false ||