Skip to content

Commit 5c9a117

Browse files
committed
strict type fix
1 parent 02d0864 commit 5c9a117

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Mail/SmtpMailer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ public function send(Message $mail): void
9393
$this->connect();
9494
}
9595

96-
if (($from = $mail->getHeader('Return-Path'))
97-
|| ($from = key($mail->getHeader('From')))
96+
if (
97+
($from = $mail->getHeader('Return-Path'))
98+
|| ($from = array_keys((array) $mail->getHeader('From'))[0])
9899
) {
99100
$this->write("MAIL FROM:<$from>", 250);
100101
}

0 commit comments

Comments
 (0)