Skip to content

Commit

Permalink
strict type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 26, 2018
1 parent 02d0864 commit 5c9a117
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mail/SmtpMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public function send(Message $mail): void
$this->connect();
}

if (($from = $mail->getHeader('Return-Path'))
|| ($from = key($mail->getHeader('From')))
if (
($from = $mail->getHeader('Return-Path'))
|| ($from = array_keys((array) $mail->getHeader('From'))[0])
) {
$this->write("MAIL FROM:<$from>", 250);
}
Expand Down

0 comments on commit 5c9a117

Please sign in to comment.