aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-10-23 12:54:53 +0000
committerCash Costello <cash.costello@gmail.com>2010-10-23 12:54:53 +0000
commitc2f005477cce4312df1bd67a88bb4d644fb14790 (patch)
treeeee7c150a01a8cf158e620d7f6a0b63304bc802c
parentcee2276dc0bd37f7981e885f9dd32cd0e113c1cc (diff)
downloadelgg-c2f005477cce4312df1bd67a88bb4d644fb14790.tar.gz
elgg-c2f005477cce4312df1bd67a88bb4d644fb14790.tar.bz2
added some protection against a container that has already been deleted
-rw-r--r--lib/image.php4
1 files changed, 3 insertions, 1 deletions
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();
}