diff options
author | Brion Vibber <brion@pobox.com> | 2010-09-02 15:39:22 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-09-02 15:39:22 -0700 |
commit | 0ef422593ba351d363c584ad781ff92548bc6e9b (patch) | |
tree | a8be5bd10d00400ebac23457a25a6160ad95b55e /classes/Notice.php | |
parent | cbcb9b0080d262a042adedaf632300e86a57e980 (diff) |
Don't explode if we fail to load a listed attachment id in Notice::attachments()
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 0eeebfadf..b991ecbd3 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; |