From: Evan Prodromou Date: Tue, 7 Sep 2010 19:54:06 +0000 (-0400) Subject: text substitution is Unicode-aware for twitterstatusfetcher X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5c98dfd58cabe2aa4b64e912f830cfbcd0fcecc1;p=quix0rs-gnu-social.git text substitution is Unicode-aware for twitterstatusfetcher --- diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php index 96a517732a..f1305696b3 100755 --- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php +++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php @@ -759,10 +759,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon default: continue; } - $text = substr_replace($text, - $linkText, - $object->indices[0], - $object->indices[1] - $object->indices[0]); + $text = mb_substr($text, 0, $object->indices[0]) . $linkText . mb_substr($text, $object->indices[1]); } return $text; }