PHPCS: add a few more selective ignores
... for things already handled correctly in the code.
This commit is contained in:
parent
19fb4e2727
commit
c24a4147cd
|
|
@ -1258,8 +1258,10 @@ class PHPMailer
|
|||
$addresses = [];
|
||||
if (function_exists('imap_rfc822_parse_adrlist')) {
|
||||
//Use this built-in parser if it's available
|
||||
// phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.imap_rfc822_parse_adrlistRemoved -- wrapped in function_exists()
|
||||
$list = imap_rfc822_parse_adrlist($addrstr, '');
|
||||
// Clear any potential IMAP errors to get rid of notices being thrown at end of script.
|
||||
// phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.imap_errorsRemoved -- wrapped in function_exists()
|
||||
imap_errors();
|
||||
foreach ($list as $address) {
|
||||
if (
|
||||
|
|
@ -5117,12 +5119,14 @@ class PHPMailer
|
|||
}
|
||||
if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
|
||||
if (\PHP_MAJOR_VERSION < 8) {
|
||||
// phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.openssl_pkey_freeDeprecated
|
||||
openssl_pkey_free($privKey);
|
||||
}
|
||||
|
||||
return base64_encode($signature);
|
||||
}
|
||||
if (\PHP_MAJOR_VERSION < 8) {
|
||||
// phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.openssl_pkey_freeDeprecated
|
||||
openssl_pkey_free($privKey);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
* Note: this test fixture uses a syntax (backticks) which has been deprecated in PHP 8.5 and
|
||||
* is slated for removal in PHP 9.0.
|
||||
* For that reason, the file is excluded from the linting check on PHP 8.5 and above.
|
||||
*
|
||||
* @phpcs:disable PHPCompatibility.LanguageConstructs.RemovedLanguageConstructs.t_backtickDeprecated
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Confirming that test fixture was loaded correctly (yz).';
|
||||
|
|
|
|||
Loading…
Reference in New Issue