diff options
author | deva <deva> | 2008-10-24 10:20:04 +0000 |
---|---|---|
committer | deva <deva> | 2008-10-24 10:20:04 +0000 |
commit | 96b8bc5ff5882f33114137d6b07db32e17b8ad87 (patch) | |
tree | 24ee6be2390627fc005b0e2ec12829c0fc5aef47 /utils/album.php | |
parent | 9bca27c9342bd4f34bed77dd3eb8c51dd686cdf1 (diff) |
Did a lot of work on the page and module systems.
Diffstat (limited to 'utils/album.php')
-rw-r--r-- | utils/album.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/album.php b/utils/album.php index 1b6b662..696e75e 100644 --- a/utils/album.php +++ b/utils/album.php @@ -122,10 +122,12 @@ function getRandomPhoto() $numphotos = sizeof($album->photos); $rphoto = rand(0, $numphotos-1); - foreach($album->photos as $p) { - $photo = $p; - $rphoto--; - if(!$rphoto) break; + if($album->photos) { + foreach($album->photos as $p) { + $photo = $p; + $rphoto--; + if(!$rphoto) break; + } } // echo "<p>".$numalbums . " " .$ralbum . " ".$numphotos . " ".$rphoto . "</p>"; |