From 8d3f4e55c765781824902f763ab499d49d3ce430 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 14 Jul 2012 09:48:32 -0400 Subject: Fixes #34 checks that the album exists before using it --- views/default/river/object/tidypics_batch/create.php | 4 ++++ 1 file changed, 4 insertions(+) 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(), -- cgit v1.2.3