]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Bookmarks more robust to missing profiles
authorEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 03:47:05 +0000 (23:47 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 7 Apr 2011 03:47:05 +0000 (23:47 -0400)
plugins/Bookmark/BookmarkPlugin.php

index b8e86e3aa82a9c6a3748f66ae4d6e050d5786f9b..db2a32f39228824be11e687acacd8e447cc5ba07 100644 (file)
@@ -554,13 +554,15 @@ class BookmarkPlugin extends MicroAppPlugin
 
             foreach ($replies as $reply) {
                 $other = Profile::staticGet('id', $reply);
-                $out->elementStart('li');
-                $out->element('a', array('rel' => 'tag',
-                                         'href' => $other->profileurl,
-                                         'title' => $other->getBestName()),
-                              sprintf('for:%s', $other->nickname));
-                $out->elementEnd('li');
-                $out->text(' ');
+                if (!empty($other)) {
+                    $out->elementStart('li');
+                    $out->element('a', array('rel' => 'tag',
+                                             'href' => $other->profileurl,
+                                             'title' => $other->getBestName()),
+                                  sprintf('for:%s', $other->nickname));
+                    $out->elementEnd('li');
+                    $out->text(' ');
+                }
             }
 
             foreach ($tags as $tag) {