From 00c358956fcece251b8d78f2c6a41098571472c7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 4 Mar 2009 12:07:53 -0800 Subject: check for profile record --- lib/noticesection.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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); -- cgit v1.2.3-54-g00ecf