From: Evan Prodromou Date: Thu, 7 Apr 2011 03:47:05 +0000 (-0400) Subject: Bookmarks more robust to missing profiles X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bf39c95795024e8dd99ca0b35fd562f5960040ef;p=quix0rs-gnu-social.git Bookmarks more robust to missing profiles --- diff --git a/plugins/Bookmark/BookmarkPlugin.php b/plugins/Bookmark/BookmarkPlugin.php index b8e86e3aa8..db2a32f392 100644 --- a/plugins/Bookmark/BookmarkPlugin.php +++ b/plugins/Bookmark/BookmarkPlugin.php @@ -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) {