From bf39c95795024e8dd99ca0b35fd562f5960040ef Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 6 Apr 2011 23:47:05 -0400 Subject: [PATCH] Bookmarks more robust to missing profiles --- plugins/Bookmark/BookmarkPlugin.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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) { -- 2.39.5