From: Evan Prodromou Date: Tue, 29 Dec 2009 20:25:41 +0000 (-0800) Subject: don't show notices with deleted profiles X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=360fdb219dde7cb46b919aa18826df8ce5f4fdc6;p=quix0rs-gnu-social.git don't show notices with deleted profiles --- diff --git a/lib/noticelist.php b/lib/noticelist.php index 4c11ceed6c..5eb2633ac2 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -191,6 +191,14 @@ class NoticeListItem extends Widget 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(); if (Event::handle('StartShowNoticeItem', array($this))) { $this->showNotice();