Skip to content

[5.8] MailFake::failures() returns an empty array#28538

Merged
taylorotwell merged 1 commit intolaravel:5.8from
shadoWalker89:patch-3
May 15, 2019
Merged

[5.8] MailFake::failures() returns an empty array#28538
taylorotwell merged 1 commit intolaravel:5.8from
shadoWalker89:patch-3

Conversation

@shadoWalker89
Copy link
Contributor

When there is no failures, calling the failures() method on the real Mailer returns an empty array.
The fake mailer should do the same.

In my application i'm using the failures() method this way.

if (in_array($some_email, $mailer->failures())) {
    // Do something
}

When running my tests and using the Mail::fake() i get this error
ErrorException : in_array() expects parameter 2 to be array, null given

@taylorotwell taylorotwell merged commit 9d8aad9 into laravel:5.8 May 15, 2019
@shadoWalker89 shadoWalker89 deleted the patch-3 branch May 15, 2019 13:14
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.

2 participants