Skip to content

Commit fb64c69

Browse files
authored
Apply suggestions from @nicolas-grekas
1 parent 2a59314 commit fb64c69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class DiscordTransport extends AbstractTransport
2929
{
3030
protected const HOST = 'discord.com';
3131

32-
private const MAX_SUBJECT_LENGTH = 2000;
32+
private const SUBJECT_LIMIT = 2000;
3333

3434
private $token;
3535
private $webhookId;
@@ -67,7 +67,7 @@ protected function doSend(MessageInterface $message): SentMessage
6767

6868
$content = $message->getSubject();
6969

70-
if (mb_strlen($content) > self::MAX_SUBJECT_LENGTH) {
70+
if (mb_strlen($content, 'UTF-8') > self::SUBJECT_LIMIT) {
7171
throw new LogicException('The subject length of a Discord message must not exceed 2000 characters.');
7272
}
7373

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy