From: Cash Costello Date: Sat, 14 Jul 2012 13:48:32 +0000 (-0400) Subject: Fixes #34 checks that the album exists before using it X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=8d3f4e55c765781824902f763ab499d49d3ce430;p=lorea%2Felgg.git Fixes #34 checks that the album exists before using it --- diff --git a/views/default/river/object/tidypics_batch/create.php b/views/default/river/object/tidypics_batch/create.php index 418cf1ac3..dc47284d2 100644 --- a/views/default/river/object/tidypics_batch/create.php +++ b/views/default/river/object/tidypics_batch/create.php @@ -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(),