0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 01:52:15 +02:00

CS and early continue

If it's null or empty, we know the next test will fail too, so continue straight away
This commit is contained in:
Marcus Bointon 2023-10-02 11:21:51 +02:00 committed by GitHub
parent 9c5282e2a1
commit 358be9a467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1571,8 +1571,9 @@ class PHPMailer
//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})) {