Skip to content

Commit

Permalink
Merge pull request #2726 from 3Dgoo/patch-1
Browse files Browse the repository at this point in the history
FIX Ensure search form start var is not a negative number
  • Loading branch information
dhensby authored Mar 29, 2022
2 parents 101b17f + ceeed65 commit 3ef3a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/Search/SearchForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function getResults()
$keywords = $this->addStarsToKeywords($keywords);

$pageLength = $this->getPageLength();
$start = $request->requestVar('start') ?: 0;
$start = max(0, (int)$request->requestVar('start'));

$booleanSearch =
strpos($keywords, '"') !== false ||
Expand Down

0 comments on commit 3ef3a93

Please sign in to comment.