diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 17d6e54b..a1e315ef 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -412,7 +412,7 @@ function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fe // Do not allow requesting a page that doesn't exist // and do a fallback to the highest page number available - if ($serendipity['GET']['page'] > $totalPages) { + if ($totalPages > 0 && $serendipity['GET']['page'] > $totalPages) { $serendipity['GET']['page'] = $totalPages; }