Skip to content

Can't deserialize previously normalized empty Email #53664

@hunhejj

Description

@hunhejj

Symfony version(s) affected

6.4.0

Description

When trying to deserialize an empty email I get the following exception:

Symfony\Component\Serializer\Exception\NotNormalizableValueException: The type of the "message" attribute for class "Symfony\Component\Mime\Email" must be one of "iterable", "string" ("null" given).

The exception trace is:

symfony/serializer/Exception/NotNormalizableValueException.php:32
symfony/serializer/Normalizer/AbstractObjectNormalizer.php:616
symfony/serializer/Normalizer/AbstractObjectNormalizer.php:382
symfony/serializer/Normalizer/MimeMessageNormalizer.php:107
symfony/serializer/Serializer.php:247

How to reproduce

Normalized data:

[
    'text' => null,
    'textCharset' => null,
    'html' => null,
    'htmlCharset' => null,
    'attachments' => [],
    'cachedBody' => null,
    'headers' => [],
    'body' => null,
    'message' => null,
]

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

      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