Don't explode if we fail to load a listed attachment id in Notice::attachments()

This commit is contained in:
Brion Vibber 2010-09-02 15:39:22 -07:00
parent cbcb9b0080
commit 0ef422593b

View File

@ -578,9 +578,11 @@ class Notice extends Memcached_DataObject
if ($f2p->find()) { if ($f2p->find()) {
while ($f2p->fetch()) { while ($f2p->fetch()) {
$f = File::staticGet($f2p->file_id); $f = File::staticGet($f2p->file_id);
if ($f) {
$att[] = clone($f); $att[] = clone($f);
} }
} }
}
return $att; return $att;
} }