$keypart = sprintf('tagsub:by_profile:%d', $profile->id);
$tagstring = self::cacheGet($keypart);
- if ($tagstring !== false) {
+ if ($tagstring !== false && !empty($tagstring)) {
$tags = explode(',', $tagstring);
} else {
$tagsub = new TagSub();
if ($tagsub->find()) {
while ($tagsub->fetch()) {
- $tags[] = $tagsub->tag;
+ if (!empty($tagsub->tag)) {
+ $tags[] = $tagsub->tag;
+ }
}
}
$this->out->elementStart('ul', array('class' => 'nav'));
foreach ($this->tags as $tag) {
+ if (!empty($tag)) {
$this->out->menuItem(common_local_url('tag',
array('tag' => $tag)),
sprintf('#%s', $tag),
sprintf(_('Notices tagged with %s'), $tag),
$this->actionName == 'tag' && $this->action->arg('tag') == $tag,
'nav_streams_tag_'.$tag);
+ }
}
$this->out->elementEnd('ul');