Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Closed
Description
4.3.2
When$flattenException
is built from$lastRedeliveryStamp
inSymfony\Component\Messenger\Command\AbstractFailedMessagesCommand:76
it may containsnull
intraceAsString
. Which causes exceptions inSymfony\Component\Messenger\Command\AbstractFailedMessagesCommand:103
, because SymfonyStyle does not like nulls as messages.
$flattenException = null === $lastRedeliveryStamp ? null : $lastRedeliveryStamp->getFlattenException();
$io->title('Exception:'); $io->writeln(null === $flattenException ? '(no data)' : $flattenException->getTraceAsString());
Actually, I don't know how to simply reproduce this exception.
I got this exception, trying sendingEmail
throughMailer
, while generating body inEmail
. (A message must have a text and/or an HTML part.
)
As a solution i could recommend the following:
- Add strong (?string) type-hinting for
Symfony\Component\Debug\Exception\FlattenException::getTraceAsString
- Do check not only for
null === $flattenException
in Symfony\Component\Messenger\Command\AbstractFailedMessagesCommand:103, but either check
null === $flattenException->getTraceAsString()`