]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added some protection against a container that has already been deleted
authorCash Costello <cash.costello@gmail.com>
Sat, 23 Oct 2010 12:54:53 +0000 (12:54 +0000)
committerCash Costello <cash.costello@gmail.com>
Sat, 23 Oct 2010 12:54:53 +0000 (12:54 +0000)
lib/image.php

index c60eabfc088193b834b92e811d99441c231a22da..a22e1db1ca6e2c365ff40c34646735e3cedf4de7 100644 (file)
@@ -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();
        }