Use mb_strlen

This commit is contained in:
Stephen Paul Weber 2015-10-28 01:46:08 +00:00
parent 6ac8b845bf
commit a74572b469

View File

@ -278,7 +278,7 @@ class OStatusPlugin extends Plugin
$oprofile = Ostatus_profile::ensureWebfinger($target); $oprofile = Ostatus_profile::ensureWebfinger($target);
if ($oprofile instanceof Ostatus_profile && !$oprofile->isGroup()) { if ($oprofile instanceof Ostatus_profile && !$oprofile->isGroup()) {
$profile = $oprofile->localProfile(); $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; $profile->nickname : $target;
$matches[$pos] = array('mentioned' => array($profile), $matches[$pos] = array('mentioned' => array($profile),
'type' => 'mention', 'type' => 'mention',
@ -308,7 +308,7 @@ class OStatusPlugin extends Plugin
$oprofile = Ostatus_profile::ensureProfileURL($url); $oprofile = Ostatus_profile::ensureProfileURL($url);
if ($oprofile instanceof Ostatus_profile && !$oprofile->isGroup()) { if ($oprofile instanceof Ostatus_profile && !$oprofile->isGroup()) {
$profile = $oprofile->localProfile(); $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; $profile->nickname : $target;
$matches[$pos] = array('mentioned' => array($profile), $matches[$pos] = array('mentioned' => array($profile),
'type' => 'mention', 'type' => 'mention',