Skip to content

Commit

Permalink
Merge pull request #1162 from ytetsuro/fix/paginate-bug
Browse files Browse the repository at this point in the history
Fixed insufficient validation of parameters related to pager.
  • Loading branch information
lonnieezell authored Aug 16, 2018
2 parents 412e163 + 2dc9a8f commit f3a8caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ public function chunk($size = 100, \Closure $userFunc)
public function paginate(int $perPage = 20, string $group = 'default')
{
// Get the necessary parts.
$page = isset($_GET['page']) && $_GET['page'] > 1 ? $_GET['page'] : 1;
$page = ctype_digit($_GET['page'] ?? '') && $_GET['page'] > 1 ? $_GET['page'] : 1;

$total = $this->countAllResults(false);

Expand Down

0 comments on commit f3a8caf

Please sign in to comment.