Make WordPress Core

Changeset 54937

Timestamp:
12/06/2022 12:17:12 PM (20 months ago)
Author:
SergeyBiryukov
Message:

External Libraries: Upgrade PHPMailer to version 6.7.

This is a bug fix release which also contains some PHP 8.1 related improvements.

References:

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917], [54427].

Props jrf, Synchro.
Fixes #57281.

Location:
trunk/src/wp-includes/PHPMailer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/PHPMailer/PHPMailer.php

    r54427 r54937  
    751751     * @var string
    752752     */
    753     const VERSION = '6.6.5';
     753    const VERSION = '6.';
    754754
    755755    /**
     
    859859    {
    860860        //Check overloading of mail function to avoid double-encoding
    861         if (ini_get('mbstring.func_overload') & 1) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
     861        if (ini_get('mbstring.func_overload') & 1) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
    862862            $subject = $this->secureHeader($subject);
    863863        } else {
     
    11231123        //Immediately add standard addresses without IDN.
    11241124        return call_user_func_array([$this, 'addAnAddress'], $params);
     1125
     1126
     1127
     1128
     1129
     1130
     1131
     1132
     1133
     1134
     1135
     1136
     1137
     1138
     1139
     1140
    11251141    }
    11261142
     
    16741690            }
    16751691        } catch (Exception $exc) {
     1692
     1693
    16761694            if ($this->Mailer === 'smtp' && $this->SMTPKeepAlive == true && $this->smtp->connected()) {
    16771695                $this->smtp->reset();
    16781696            }
    1679             $this->setError($exc->getMessage());
    1680             $this->edebug($exc->getMessage());
    16811697            if ($this->exceptions) {
    16821698                throw $exc;
     
    27972813        $body = '';
    27982814        //Create unique IDs and preset boundaries
    2799         $this->uniqueid = $this->generateId();
    2800         $this->boundary[1] = 'b1_' . $this->uniqueid;
    2801         $this->boundary[2] = 'b2_' . $this->uniqueid;
    2802         $this->boundary[3] = 'b3_' . $this->uniqueid;
     2815        $this->setBoundaries();
    28032816
    28042817        if ($this->sign_key_file) {
     
    28362849        }
    28372850        //Use this as a preamble in all multipart message types
    2838         $mimepre = 'This is a multi-part message in MIME format.' . static::$LE . static::$LE;
     2851        $mimepre = ';
    28392852        switch ($this->message_type) {
    28402853            case 'inline':
     
    30733086
    30743087    /**
     3088
     3089
     3090
     3091
     3092
     3093
     3094
     3095
     3096
     3097
     3098
     3099
    30753100     * Return the start of a message boundary.
    30763101     *
     
    41894214     * @param string|null $value Header value
    41904215     *
     4216
    41914217     * @throws Exception
    41924218     */
     
    46384664
    46394665    /**
    4640      * Remove trailing breaks from a string.
     4666     * Remove trailing from a string.
    46414667     *
    46424668     * @param string $text
    46434669     *
     4670
     4671
     4672
     4673
     4674
     4675
     4676
     4677
     4678
     4679
     4680
     4681
    46444682     * @return string The text to remove breaks from
    46454683     */
    4646     public static function stripTrailingWSP($text)
    4647     {
    4648         return rtrim($text, " \r\n\t");
     4684    public static function stripTrailing($text)
     4685    {
     4686        return rtrim($text, "");
    46494687    }
    46504688
     
    48124850
    48134851        //Reduce multiple trailing line breaks to a single one
    4814         return static::stripTrailingWSP($body) . self::CRLF;
     4852        return static::stripTrailing($body) . self::CRLF;
    48154853    }
    48164854
  • trunk/src/wp-includes/PHPMailer/SMTP.php

    r54427 r54937  
    3636     * @var string
    3737     */
    38     const VERSION = '6.6.5';
     38    const VERSION = '6.';
    3939
    4040    /**
Note: See TracChangeset for help on using the changeset viewer.