Skip to content

Commit

Permalink
Merge pull request clonemeagain#24 from Axadiw/multibyte_characters_d…
Browse files Browse the repository at this point in the history
…ivision

Fixed multibyte characters division (and Slack 400 errors)
  • Loading branch information
clonemeagain authored Aug 17, 2020
2 parents ca65391 + 61b8af3 commit dd13f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slack.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function format_text($text) {
'CONTROLEND' => '>'
];
// Replace the CONTROL characters, and limit text length to 500 characters.
return substr(str_replace(array_keys($moreformatter), array_values($moreformatter), $formatted_text), 0, 500);
return mb_substr(str_replace(array_keys($moreformatter), array_values($moreformatter), $formatted_text), 0, 500);
}

/**
Expand Down

0 comments on commit dd13f65

Please sign in to comment.