diff --git a/themes/danbooru/themelet.class.php b/themes/danbooru/themelet.class.php index b2eefae8..3dc3b483 100644 --- a/themes/danbooru/themelet.class.php +++ b/themes/danbooru/themelet.class.php @@ -10,6 +10,7 @@ class Themelet { public function display_paginator($page, $base, $query, $page_number, $total_pages) { + if($total_pages == 0) $total_pages = 1; $body = $this->build_paginator($page_number, $total_pages, $base, $query); $page->add_block(new Block(null, $body, "main", 90)); } diff --git a/themes/default/themelet.class.php b/themes/default/themelet.class.php index 562ab91e..6fe3f348 100644 --- a/themes/default/themelet.class.php +++ b/themes/default/themelet.class.php @@ -10,6 +10,7 @@ class Themelet { public function display_paginator($page, $base, $query, $page_number, $total_pages) { + if($total_pages == 0) $total_pages = 1; $body = $this->build_paginator($page_number, $total_pages, $base, $query); $page->add_block(new Block(null, $body, "main", 90)); }