]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check for profile record
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 4 Mar 2009 20:07:53 +0000 (12:07 -0800)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 4 Mar 2009 20:07:53 +0000 (12:07 -0800)
lib/noticesection.php

index b31f18744557be91c42975ca0baaef70139271cb..94c2738efdabc3c5b1c60e5da6b3a774c8cd8c63 100644 (file)
@@ -73,6 +73,11 @@ class NoticeSection extends Section
     function showNotice($notice)
     {
         $profile = $notice->getProfile();
+        if (empty($profile)) {
+            common_log(LOG_WARNING, sprintf("Notice %d has no profile",
+                                            $notice->id));
+            return;
+        }
         $this->out->elementStart('li', 'hentry notice');
         $this->out->elementStart('div', 'entry-title');
         $avatar = $profile->getAvatar(AVATAR_MINI_SIZE);