From 641e7de6373bcbf7ffb5ac3a8b737fb31f4f33c7 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 14 May 2007 07:12:15 +0000 Subject: catalog build technically works now, still working out some issues with the dynamic updating of the current state --- lib/album.lib.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/album.lib.php') diff --git a/lib/album.lib.php b/lib/album.lib.php index ceb6cdf2..94ee1726 100644 --- a/lib/album.lib.php +++ b/lib/album.lib.php @@ -78,6 +78,8 @@ function get_random_albums($count='') { $total = count($albums); + if ($total == '0') { return array(); } + for ($i=0; $i <= $count; $i++) { $record = rand(0,$total); if (isset($results[$record]) || !$albums[$record]) { $i--; } -- cgit