minor #39589 [Notifier] [Discord] Use sprintf for exception message (OskarStark)
This PR was merged into the 5.2 branch.
Discussion
----------
[Notifier] [Discord] Use sprintf for exception message
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | ---
| License | MIT
| Doc PR | ---
Commits
-------
d9eb1a1f6e
[Notifier] [Discord] Use sprintf for exception message
This commit is contained in:
commit
096f42dc95
@ -68,7 +68,7 @@ final class DiscordTransport extends AbstractTransport
|
||||
$content = $message->getSubject();
|
||||
|
||||
if (mb_strlen($content, 'UTF-8') > self::SUBJECT_LIMIT) {
|
||||
throw new LogicException('The subject length of a Discord message must not exceed 2000 characters.');
|
||||
throw new LogicException(sprintf('The subject length of a Discord message must not exceed %d characters.', self::SUBJECT_LIMIT));
|
||||
}
|
||||
|
||||
$endpoint = sprintf('https://%s/api/webhooks/%s/%s', $this->getEndpoint(), $this->webhookId, $this->token);
|
||||
|
Reference in New Issue
Block a user