Merge pull request #3240 from SirLouen/patch/3201v2

Regressing deprecatedArg
This commit is contained in:
Marcus Bointon 2025-09-30 13:51:19 +02:00 committed by GitHub
commit fe380a85e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -35,4 +35,4 @@ $PHPMAILER_LANG['smtp_detail'] = 'Detalle: ';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; $PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; $PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
$PHPMAILER_LANG['imap_recommended'] = 'No se recomienda usar el analizador de direcciones simplificado. Instala la extensión IMAP de PHP para un análisis RFC822 más completo.'; $PHPMAILER_LANG['imap_recommended'] = 'No se recomienda usar el analizador de direcciones simplificado. Instala la extensión IMAP de PHP para un análisis RFC822 más completo.';
$PHPMAILER_LANG['deprecated_argument'] = 'El argumento $deprecatedArg ha quedado obsoleto'; $PHPMAILER_LANG['deprecated_argument'] = 'El argumento $useimap ha quedado obsoleto';

View File

@ -1241,15 +1241,15 @@ class PHPMailer
* *
* @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
* *
* @param string $addrstr The address list string * @param string $addrstr The address list string
* @param string|null $deprecatedArg Deprecated argument since 6.11.0. * @param null $useimap Deprecated argument since 6.11.0.
* @param string $charset The charset to use when decoding the address list string. * @param string $charset The charset to use when decoding the address list string.
* *
* @return array * @return array
*/ */
public static function parseAddresses($addrstr, $deprecatedArg = null, $charset = self::CHARSET_ISO88591) public static function parseAddresses($addrstr, $useimap = null, $charset = self::CHARSET_ISO88591)
{ {
if ($deprecatedArg !== null) { if ($useimap !== null) {
trigger_error(self::lang('deprecated_argument'), E_USER_DEPRECATED); trigger_error(self::lang('deprecated_argument'), E_USER_DEPRECATED);
} }
$addresses = []; $addresses = [];
@ -2482,7 +2482,7 @@ class PHPMailer
'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses', 'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses',
'imap_recommended' => 'Using simplified address parser is not recommended. ' . 'imap_recommended' => 'Using simplified address parser is not recommended. ' .
'Install the PHP IMAP extension for full RFC822 parsing.', 'Install the PHP IMAP extension for full RFC822 parsing.',
'deprecated_argument' => 'Argument $deprecatedArg is deprecated', 'deprecated_argument' => 'Argument $useimap is deprecated',
]; ];
if (empty($lang_path)) { if (empty($lang_path)) {
//Calculate an absolute path so it can work if CWD is not here //Calculate an absolute path so it can work if CWD is not here