From: Brion Vibber Date: Thu, 2 Sep 2010 22:39:22 +0000 (-0700) Subject: Don't explode if we fail to load a listed attachment id in Notice::attachments() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0ef422593ba351d363c584ad781ff92548bc6e9b;p=quix0rs-gnu-social.git Don't explode if we fail to load a listed attachment id in Notice::attachments() --- diff --git a/classes/Notice.php b/classes/Notice.php index 0eeebfadf3..b991ecbd38 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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;