mirror of
https://github.com/PHPMailer/PHPMailer.git
synced 2024-09-20 01:52:15 +02:00
explicit indirect variable
Add curly braces to indirect variables to make them clear to understand.
This commit is contained in:
parent
a4d87ad5bd
commit
998bfddd69
@ -1555,17 +1555,17 @@ class PHPMailer
|
||||
|
||||
//Validate From, Sender, and ConfirmReadingTo addresses
|
||||
foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
|
||||
$this->$address_kind = trim($this->$address_kind);
|
||||
if (empty($this->$address_kind)) {
|
||||
$this->{$address_kind} = trim($this->{$address_kind});
|
||||
if (empty($this->{$address_kind})) {
|
||||
continue;
|
||||
}
|
||||
$this->$address_kind = $this->punyencodeAddress($this->$address_kind);
|
||||
if (!static::validateAddress($this->$address_kind)) {
|
||||
$this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind});
|
||||
if (!static::validateAddress($this->{$address_kind})) {
|
||||
$error_message = sprintf(
|
||||
'%s (%s): %s',
|
||||
$this->lang('invalid_address'),
|
||||
$address_kind,
|
||||
$this->$address_kind
|
||||
$this->{$address_kind}
|
||||
);
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
@ -1665,7 +1665,7 @@ class PHPMailer
|
||||
default:
|
||||
$sendMethod = $this->Mailer . 'Send';
|
||||
if (method_exists($this, $sendMethod)) {
|
||||
return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
|
||||
return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody);
|
||||
}
|
||||
|
||||
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
|
||||
@ -4580,7 +4580,7 @@ class PHPMailer
|
||||
public function set($name, $value = '')
|
||||
{
|
||||
if (property_exists($this, $name)) {
|
||||
$this->$name = $value;
|
||||
$this->{$name} = $value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user