check for profile record

This commit is contained in:
Evan Prodromou 2009-03-04 12:07:53 -08:00
parent 8cc19b90ee
commit 00c358956f

View File

@ -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);