Only check mb_strlen()

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-01-17 12:03:27 +01:00 committed by Vitor Mattos
parent d850dc0220
commit e0b89cd576
No known key found for this signature in database
GPG key ID: B7AB4B76A7CA7318

View file

@ -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');
}