don't show notices with deleted profiles

This commit is contained in:
Evan Prodromou 2009-12-29 12:25:41 -08:00
parent 45c4078ca9
commit 360fdb219d

View File

@ -191,6 +191,14 @@ class NoticeListItem extends Widget
function show() function show()
{ {
if (empty($this->notice)) {
common_log(LOG_WARNING, "Trying to show missing notice; skipping.");
return;
} else if (empty($this->profile)) {
common_log(LOG_WARNING, "Trying to show missing profile (" . $this->notice->profile_id . "); skipping.");
return;
}
$this->showStart(); $this->showStart();
if (Event::handle('StartShowNoticeItem', array($this))) { if (Event::handle('StartShowNoticeItem', array($this))) {
$this->showNotice(); $this->showNotice();