Only check mb_strlen()

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/30379/head
Joas Schilling 2022-01-17 12:03:27 +07:00 committed by Vitor Mattos
parent d850dc0220
commit e0b89cd576
No known key found for this signature in database
GPG Key ID: B7AB4B76A7CA7318
1 changed files with 1 additions and 1 deletions

@ -148,7 +148,7 @@ class Manager implements ICommentsManager {
throw new \UnexpectedValueException('Actor, Object and Verb information must be provided for saving');
}
if ($comment->getVerb() === 'reaction' && strlen($comment->getMessage()) > 8) {
if ($comment->getVerb() === 'reaction' && mb_strlen($comment->getMessage()) > 8) {
throw new \UnexpectedValueException('Reactions cannot be longer than 8 bytes');
}