Skip to content

Commit d6d19e4

Browse files
committed
Fix paginator
1 parent c07c087 commit d6d19e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Paginator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(
3131
) {
3232
$this->total = count($items);
3333
$this->page = Http::get('p', 1);
34-
$this->per_page = Http::get('pp', 50);
34+
$this->per_page = min(500, max(1, Http::get('pp', 50)));
3535
$this->paginated = array_slice($items, $this->per_page * ($this->page - 1), $this->per_page, true);
3636
}
3737

0 commit comments

Comments
 (0)