aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/album.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-03-20 20:57:15 +0000
committerCash Costello <cash.costello@gmail.com>2009-03-20 20:57:15 +0000
commita5202ff8f416b327a26df87d0e92dd4ccdb8c084 (patch)
tree8791f4d9519ee7ccd2dadbbb863de0ca5a8d549e /views/default/object/album.php
parent7550a4521b7f8e0b4a6e76ca109c8a5b5848726c (diff)
downloadelgg-a5202ff8f416b327a26df87d0e92dd4ccdb8c084.tar.gz
elgg-a5202ff8f416b327a26df87d0e92dd4ccdb8c084.tar.bz2
defensive coding for empty album
Diffstat (limited to 'views/default/object/album.php')
-rw-r--r--views/default/object/album.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/views/default/object/album.php b/views/default/object/album.php
index b95d55eed..9d3dc507f 100644
--- a/views/default/object/album.php
+++ b/views/default/object/album.php
@@ -111,14 +111,15 @@
//build array for back | next links
$_SESSION['image_sort'] = array();
- foreach($count as $image){
- array_push($_SESSION['image_sort'], $image->guid);
- }
+ if(count($count) > 0) {
+ foreach($count as $image){
+ array_push($_SESSION['image_sort'], $image->guid);
+ }
- if(count($count) > 0)
echo list_entities("object","image", $file_guid, 24, false);
- else
+ } else {
echo elgg_echo('image:none');
+ }
?>
<div class="clearfloat"></div>