aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-14 19:58:36 +0000
committerMario <mario@mariovavti.com>2024-01-14 19:58:36 +0000
commit885068834f8b4f5b0816075e95c55b31d0723511 (patch)
tree69fd4367077bc8ae5182ad59ecde4eb84d9a5aa3 /include/text.php
parentc4c4ab2f3de5b71faa5f739e18eabb14bb108929 (diff)
downloadvolse-hubzilla-885068834f8b4f5b0816075e95c55b31d0723511.tar.gz
volse-hubzilla-885068834f8b4f5b0816075e95c55b31d0723511.tar.bz2
volse-hubzilla-885068834f8b4f5b0816075e95c55b31d0723511.zip
fix more php deprecations
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;
}