Skip to content

Fix MandrillApiTransport response toArray  #34626

Closed
@Arthurhall

Description

@Arthurhall

Symfony version(s) affected: 4.4.0

Description

Here : https://github.com/symfony/mailchimp-mailer/blob/v4.4.0/Transport/MandrillApiTransport.php#L51
The $result variable first key is 0. The key 0 contains the array with status, _id, etc ...

Possible Solution

        $result = $response->toArray(false);
        if (!isset($result['_id']) && isset($result[0]) && isset($result[0]['_id'])) {
            $result = $result[0];
        }

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions