]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/OStatusPlugin.php
Use mb_strlen
[quix0rs-gnu-social.git] / plugins / OStatus / OStatusPlugin.php
index 2b412d73e0cae766aad00f02257a4be758933f43..f8d4dc627b7562e64c12c2fd93019d5be51fa93c 100644 (file)
@@ -278,7 +278,7 @@ class OStatusPlugin extends Plugin
                     $oprofile = Ostatus_profile::ensureWebfinger($target);
                     if ($oprofile instanceof Ostatus_profile && !$oprofile->isGroup()) {
                         $profile = $oprofile->localProfile();
-                        $text = !empty($profile->nickname) && strlen($profile->nickname) < strlen($target) ?
+                        $text = !empty($profile->nickname) && mb_strlen($profile->nickname) < mb_strlen($target) ?
                                 $profile->nickname : $target;
                         $matches[$pos] = array('mentioned' => array($profile),
                                                'type' => 'mention',
@@ -308,7 +308,7 @@ class OStatusPlugin extends Plugin
                         $oprofile = Ostatus_profile::ensureProfileURL($url);
                         if ($oprofile instanceof Ostatus_profile && !$oprofile->isGroup()) {
                             $profile = $oprofile->localProfile();
-                            $text = !empty($profile->nickname) && strlen($profile->nickname) < strlen($target) ?
+                            $text = !empty($profile->nickname) && mb_strlen($profile->nickname) < mb_strlen($target) ?
                                     $profile->nickname : $target;
                             $matches[$pos] = array('mentioned' => array($profile),
                                                    'type' => 'mention',