]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #34 checks that the album exists before using it
authorCash Costello <cash.costello@gmail.com>
Sat, 14 Jul 2012 13:48:32 +0000 (09:48 -0400)
committerCash Costello <cash.costello@gmail.com>
Sat, 14 Jul 2012 13:48:32 +0000 (09:48 -0400)
views/default/river/object/tidypics_batch/create.php

index 418cf1ac33197298dddedb95ad7d7e8b8886b6de..dc47284d2e1806b21b7d22d091af0613bca8c660 100644 (file)
@@ -19,6 +19,10 @@ $images = elgg_get_entities_from_relationship(array(
 ));
 
 $album = $batch->getContainerEntity();
+if (!$album) {
+       // something went quite wrong - this batch has no associated album
+       return true;
+}
 $album_link = elgg_view('output/url', array(
        'href' => $album->getURL(),
        'text' => $album->getTitle(),