aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index fc30ed8aa..c6b2bed78 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2888,6 +2888,7 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
$replaced = false;
$r = null;
$match = array();
+ $newtag = '';
$termtype = ((strpos($tag,'#') === 0) ? TERM_HASHTAG : TERM_UNKNOWN);
$termtype = ((strpos($tag,'@') === 0) ? TERM_MENTION : $termtype);
@@ -2937,10 +2938,11 @@ function handle_tag(&$body, &$str_tags, $profile_uid, $tag, $in_network = true)
}
// is the link already in str_tags?
- if(! stristr($str_tags,$newtag)) {
+ if (!stristr($str_tags, $newtag)) {
// append or set str_tags
- if(strlen($str_tags))
+ if (strlen($str_tags)) {
$str_tags .= ',';
+ }
$str_tags .= $newtag;
}