]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't explode if we fail to load a listed attachment id in Notice::attachments()
authorBrion Vibber <brion@pobox.com>
Thu, 2 Sep 2010 22:39:22 +0000 (15:39 -0700)
committerBrion Vibber <brion@pobox.com>
Thu, 2 Sep 2010 22:39:22 +0000 (15:39 -0700)
classes/Notice.php

index 0eeebfadf374aa7e61c89ca7f56f524f77b15bcb..b991ecbd38a153a352d8bbff0d5133a02da132b2 100644 (file)
@@ -578,7 +578,9 @@ class Notice extends Memcached_DataObject
         if ($f2p->find()) {
             while ($f2p->fetch()) {
                 $f = File::staticGet($f2p->file_id);
-                $att[] = clone($f);
+                if ($f) {
+                    $att[] = clone($f);
+                }
             }
         }
         return $att;