Taking advantage of the new static translator

This commit is contained in:
SirLouen 2025-09-26 01:16:38 +02:00
parent 238af6720e
commit f4d321633d
No known key found for this signature in database
GPG Key ID: 87796BFBFE09911B
2 changed files with 3 additions and 1 deletions

View File

@ -35,3 +35,4 @@ $PHPMAILER_LANG['smtp_detail'] = 'Detalle: ';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$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['deprecated_argument'] = 'El argumento $deprecatedArg ha quedado obsoleto';

View File

@ -1246,7 +1246,7 @@ class PHPMailer
public static function parseAddresses($addrstr, $deprecatedArg = null, $charset = self::CHARSET_ISO88591)
{
if ($deprecatedArg !== null) {
trigger_error("Argument \$deprecatedArg is deprecated", E_USER_DEPRECATED);
trigger_error(self::lang('deprecated_argument'), E_USER_DEPRECATED);
}
$addresses = [];
if (function_exists('imap_rfc822_parse_adrlist')) {
@ -2478,6 +2478,7 @@ class PHPMailer
'no_smtputf8' => 'Server does not support SMTPUTF8 needed to send to Unicode addresses',
'imap_recommended' => 'Using simplified address parser is not recommended. ' .
'Install the PHP IMAP extension for full RFC822 parsing.',
'deprecated_argument' => 'Argument $deprecatedArg is deprecated',
];
if (empty($lang_path)) {
//Calculate an absolute path so it can work if CWD is not here