]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
Don't explode if we fail to load a listed attachment id in Notice::attachments()
[quix0rs-gnu-social.git] / 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;