Skip to content

Commit

Permalink
Merge pull request #4 from Danielss89/patch-1
Browse files Browse the repository at this point in the history
Only check CC if actually set
  • Loading branch information
ericmartel authored Dec 21, 2016
2 parents 5e2ad15 + 4eb5cfb commit 5eedc92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MailHog.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function accessInboxFor($address)
{
if(!isset($email->Content->Headers->Bcc))
{
if(strpos($email->Content->Headers->To[0], $addressPlusDelimiters) || array_search($email->Content->Headers->Cc[0], $addressPlusDelimiters))
if(strpos($email->Content->Headers->To[0], $addressPlusDelimiters) || (isset($email->Content->Headers->Cc) && array_search($email->Content->Headers->Cc[0], $addressPlusDelimiters)))
{
array_push($inbox, $email);
}
Expand Down

0 comments on commit 5eedc92

Please sign in to comment.