Skip to content

Commit

Permalink
CS and early continue
Browse files Browse the repository at this point in the history
If it's null or empty, we know the next test will fail too, so continue straight away
  • Loading branch information
Synchro authored Oct 2, 2023
1 parent 9c5282e commit 358be9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PHPMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1571,8 +1571,9 @@ public function preSend()

//Validate From, Sender, and ConfirmReadingTo addresses
foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
if($this->{$address_kind} === null) {
if ($this->{$address_kind} === null) {
$this->{$address_kind} = '';
continue;
}
$this->{$address_kind} = trim($this->{$address_kind});
if (empty($this->{$address_kind})) {
Expand Down

0 comments on commit 358be9a

Please sign in to comment.