clamp to a valid value

This commit is contained in:
Shish 2015-09-26 20:03:30 +01:00
parent e482f97955
commit ff13e58f8f

View File

@ -352,7 +352,8 @@ class CommentList extends Extension {
") / 10);
$database->cache->set("comment_pages", $total_pages, 600);
}
$total_pages = max($total_pages, 1);
$current_page = clamp($current_page, 1, $total_pages);
$threads_per_page = 10;