summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/noticelist.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 4c11ceed6..5eb2633ac 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();