8000 Fix MandrillApiTransport response toArray · Issue #34626 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fix MandrillApiTransport response toArray #34626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Arthurhall opened this issue Nov 26, 2019 · 1 comment
Closed

Fix MandrillApiTransport response toArray #34626

Arthurhall opened this issue Nov 26, 2019 · 1 comment
Labels

Comments

@Arthurhall
Copy link
Arthurhall commented Nov 26, 2019

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

@stof
Copy link
Member
stof commented Nov 26, 2019

Duplicate of #34597 which is already fixed by #34599 (will be in the next patch release)

@stof stof closed this as completed Nov 26, 2019
@xabbuh xabbuh added the Mailer label Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
0