clamp to a valid value
This commit is contained in:
parent
e482f97955
commit
ff13e58f8f
@ -352,6 +352,7 @@ class CommentList extends Extension {
|
|||||||
") / 10);
|
") / 10);
|
||||||
$database->cache->set("comment_pages", $total_pages, 600);
|
$database->cache->set("comment_pages", $total_pages, 600);
|
||||||
}
|
}
|
||||||
|
$total_pages = max($total_pages, 1);
|
||||||
|
|
||||||
$current_page = clamp($current_page, 1, $total_pages);
|
$current_page = clamp($current_page, 1, $total_pages);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user