From a74572b469acec4deb081bf94ebaf2d95207657d Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 28 Oct 2015 01:46:08 +0000 Subject: [PATCH] Use mb_strlen --- plugins/OStatus/OStatusPlugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 2b412d73e0..f8d4dc627b 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -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', -- 2.39.5