summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-19 01:26:49 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-19 01:26:49 +0000
commit8b3e2445781d09825fa4f7d65b34011f7006d35a (patch)
tree08acbcb44782df7d5bfe819be183bec627c1873c
parentc00dc21ba82a06727078a65a15ffce961d16787a (diff)
We always have at least 1 page in an album.
-rw-r--r--core/controllers/albums.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/controllers/albums.php b/core/controllers/albums.php
index d2453447..e84968c3 100644
--- a/core/controllers/albums.php
+++ b/core/controllers/albums.php
@@ -34,7 +34,7 @@ class Albums_Controller extends Items_Controller {
$offset = ($page-1) * $page_size;
// Make sure that the page references a valid offset
- if ($page < 1 || $page > ceil($children_count / $page_size)) {
+ if ($page < 1 || $page > max(ceil($children_count / $page_size), 1)) {
Kohana::show_404();
}