Skip to content

BrevoPayloadConverter causes type error if tags are not present #54197

@palgalik

Description

@palgalik

Symfony version(s) affected

6.4.5

Description

BrevoPayloadConverter handles tags parameter, that it's always present, but it's not since 6.4.5.

Since tags was removed from mandatory parameters in #54088 it should have been defaulted to empty array in the payload converter.

TypeError: Symfony\\Component\\RemoteEvent\\Event\\Mailer\\AbstractMailerEvent::setTags(): Argument #1 ($tags) must be of type array, null given, called in /app/vendor/symfony/brevo-mailer/RemoteEvent/BrevoPayloadConverter.php

How to reproduce

Call webhook controller without any tags present in the request.

Possible Solution

Add default empty array as fallback value
or
Check tags is present, before calling setTags

Additional Context

No response

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