]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't show notices with deleted profiles
authorEvan Prodromou <evan@status.net>
Tue, 29 Dec 2009 20:25:41 +0000 (12:25 -0800)
committerEvan Prodromou <evan@status.net>
Tue, 29 Dec 2009 20:25:41 +0000 (12:25 -0800)
lib/noticelist.php

index 4c11ceed6cecf60dcf4b191bece29d503745d0fa..5eb2633ac288ccbf479df5b84369374b94430022 100644 (file)
@@ -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();