summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-29 12:25:41 -0800
committerEvan Prodromou <evan@status.net>2009-12-29 12:25:41 -0800
commit360fdb219dde7cb46b919aa18826df8ce5f4fdc6 (patch)
tree0549eef95668ca39d81cf6058c6a6e2ffd466dfd /lib/noticelist.php
parent45c4078ca9de2f8f107e3c4a7cb759ac9cb2664a (diff)
don't show notices with deleted profiles
Diffstat (limited to 'lib/noticelist.php')
-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();