Skip to content

SES transport throws exception if sender not provided#9255

Merged
taylorotwell merged 2 commits intolaravel:5.1from
leoden:leoden-patch-1
Jun 13, 2015
Merged

SES transport throws exception if sender not provided#9255
taylorotwell merged 2 commits intolaravel:5.1from
leoden:leoden-patch-1

Conversation

@leoden
Copy link
Copy Markdown
Contributor

@leoden leoden commented Jun 13, 2015

Most users following the docs will send mail specifying $mail->from('me@example.com').

When using the SES transport this will throw 'key() expects parameter 1 to be array, null given' as sender is not specified

This patch will check if sender is null and replace it with the 'from' variable

Most users following the docs will send mail specifying $mail->from('me@example.com').

When using the SES transport this with throw  'key() expects parameter 1 to be array, null given' as sender is not specified

This patch will check if sender is null and replace it with the 'from' variable
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right. Just do: $message->getSender() ?: $message->getFrom()

as per @GrahamCampbell’s recommendation
taylorotwell added a commit that referenced this pull request Jun 13, 2015
SES transport throws exception if sender not provided
@taylorotwell taylorotwell merged commit 0ed5951 into laravel:5.1 Jun 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants