Changeset 53535
- Timestamp:
- 06/20/2022 03:02:32 PM (2 years ago)
- Location:
- trunk/src/wp-includes/PHPMailer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/PHPMailer/PHPMailer.php
r53500 r53535 751 751 * @var string 752 752 */ 753 const VERSION = '6.6. 2';753 const VERSION = '6.6.3'; 754 754 755 755 /** … … 1558 1558 //Validate From, Sender, and ConfirmReadingTo addresses 1559 1559 foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { 1560 $this-> $address_kind = trim($this->$address_kind);1561 if (empty($this-> $address_kind)) {1560 $this->{$address_kind} = trim($this->{$address_kind}); 1561 if (empty($this->{$address_kind})) { 1562 1562 continue; 1563 1563 } 1564 $this-> $address_kind = $this->punyencodeAddress($this->$address_kind);1565 if (!static::validateAddress($this-> $address_kind)) {1564 $this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind}); 1565 if (!static::validateAddress($this->{$address_kind})) { 1566 1566 $error_message = sprintf( 1567 1567 '%s (%s): %s', 1568 1568 $this->lang('invalid_address'), 1569 1569 $address_kind, 1570 $this-> $address_kind1570 $this->{$address_kind} 1571 1571 ); 1572 1572 $this->setError($error_message); … … 1668 1668 $sendMethod = $this->Mailer . 'Send'; 1669 1669 if (method_exists($this, $sendMethod)) { 1670 return $this-> $sendMethod($this->MIMEHeader, $this->MIMEBody);1670 return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody); 1671 1671 } 1672 1672 … … 2203 2203 if ($this->exceptions && null !== $lastexception) { 2204 2204 throw $lastexception; 2205 } elseif ($this->exceptions) { 2205 } 2206 if ($this->exceptions) { 2206 2207 // no exception was thrown, likely $this->smtp->connect() failed 2207 2208 $message = $this->getSmtpErrorMessage('connect_host'); … … 3716 3717 * displayed inline with the message, not just attached for download. 3717 3718 * This is used in HTML messages that embed the images 3718 * the HTML refers to using the $cid value.3719 * the HTML refers to using the `$cid` value in `img` tags, for example `<img src="cid:mylogo">`. 3719 3720 * Never use a user-supplied path to a file! 3720 3721 * … … 3722 3723 * @param string $cid Content ID of the attachment; Use this to reference 3723 3724 * the content when using an embedded image in HTML 3724 * @param string $name Overrides the attachment name 3725 * @param string $encoding File encoding (see $Encoding) 3726 * @param string $type File MIME type 3727 * @param string $disposition Disposition to use 3728 * 3725 * @param string $name Overrides the attachment filename 3726 * @param string $encoding File encoding (see $Encoding) defaults to `base64` 3727 * @param string $type File MIME type (by default mapped from the `$path` filename's extension) 3728 * @param string $disposition Disposition to use: `inline` (default) or `attachment` 3729 * (unlikely you want this – {@see `addAttachment()`} instead) 3730 * 3731 * @return bool True on successfully adding an attachment 3729 3732 * @throws Exception 3730 3733 * 3731 * @return bool True on successfully adding an attachment3732 3734 */ 3733 3735 public function addEmbeddedImage( … … 4107 4109 return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false; 4108 4110 } 4109 if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) { 4110 //Is it a syntactically valid hostname? 4111 return true; 4112 } 4113 4114 return false; 4111 //Is it a syntactically valid hostname (when embeded in a URL)? 4112 return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false; 4115 4113 } 4116 4114 … … 4582 4580 { 4583 4581 if (property_exists($this, $name)) { 4584 $this-> $name= $value;4582 $this->{$name} = $value; 4585 4583 4586 4584 return true; -
trunk/src/wp-includes/PHPMailer/SMTP.php
r53500 r53535 36 36 * @var string 37 37 */ 38 const VERSION = '6.6. 2';38 const VERSION = '6.6.3'; 39 39 40 40 /**
Note: See TracChangeset
for help on using the changeset viewer.