Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] flatternException->getTraceAsString() returns null sometimes, which causes exceptions #32487

Closed
@wtorsi

Description

@wtorsi

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:

  1. Add strong (?string) type-hinting forSymfony\Component\Debug\Exception\FlattenException::getTraceAsString
  2. Do check not only fornull === $flattenException in Symfony\Component\Messenger\Command\AbstractFailedMessagesCommand:103, but either checknull === $flattenException->getTraceAsString()`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp