Skip to content

Commit 2dc9a8f

Browse files
committed
fix: validation page parameter.
1 parent 412e163 commit 2dc9a8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ public function chunk($size = 100, \Closure $userFunc)
999999
public function paginate(int $perPage = 20, string $group = 'default')
10001000
{
10011001
// Get the necessary parts.
1002-
$page = isset($_GET['page']) && $_GET['page'] > 1 ? $_GET['page'] : 1;
1002+
$page = ctype_digit($_GET['page'] ?? '') && $_GET['page'] > 1 ? $_GET['page'] : 1;
10031003

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

0 commit comments

Comments
 (0)