From afcb4703f42792496f4174a69f49d82bb7249582 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 17 Feb 2011 17:14:57 +1100 Subject: [PATCH] Fixed the when-there-are-no-posts-there-are-no-pages bug --- inc/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index 0e6b54ad..c5b8f9b6 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -477,7 +477,9 @@ $count = current($query->fetch()); $count = floor(($config['threads_per_page'] + $count - 1) / $config['threads_per_page']); - + + if($count < 1) $count = 1; + $pages = Array(); for($x=0;$x<$count && $x<$config['max_pages'];$x++) { $pages[] = Array(