From: Cash Costello Date: Sat, 23 Oct 2010 12:54:53 +0000 (+0000) Subject: added some protection against a container that has already been deleted X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=c2f005477cce4312df1bd67a88bb4d644fb14790;p=lorea%2Felgg.git added some protection against a container that has already been deleted --- 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(); }