From c2f005477cce4312df1bd67a88bb4d644fb14790 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 23 Oct 2010 12:54:53 +0000 Subject: added some protection against a container that has already been deleted --- lib/image.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/image.php b/lib/image.php index c60eabfc0..a22e1db1c 100644 --- a/lib/image.php +++ b/lib/image.php @@ -25,7 +25,9 @@ class TidypicsImage extends ElggFile { public function delete() { $album = get_entity($this->container_guid); - $album->removeImage($this->guid); + if ($album) { + $album->removeImage($this->guid); + } return parent::delete(); } -- cgit v1.2.3