diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-03-04 12:07:53 -0800 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-03-04 12:07:53 -0800 |
commit | 00c358956fcece251b8d78f2c6a41098571472c7 (patch) | |
tree | 9ca2636fdd7d53470cf7006bbf0a592c0a751778 /lib | |
parent | 8cc19b90eeb7920b2cfe79959038c5e25f40930a (diff) |
check for profile record
Diffstat (limited to 'lib')
-rw-r--r-- | lib/noticesection.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/noticesection.php b/lib/noticesection.php index b31f18744..94c2738ef 100644 --- a/lib/noticesection.php +++ b/lib/noticesection.php @@ -73,6 +73,11 @@ class NoticeSection extends Section function showNotice($notice) { $profile = $notice->getProfile(); + if (empty($profile)) { + common_log(LOG_WARNING, sprintf("Notice %d has no profile", + $notice->id)); + return; + } $this->out->elementStart('li', 'hentry notice'); $this->out->elementStart('div', 'entry-title'); $avatar = $profile->getAvatar(AVATAR_MINI_SIZE); |