fix PHPStan error in phpmailer addon

pull/1603/head
Art4 2025-02-26 15:21:19 +00:00
parent bbce8c345f
commit 21a7529a0e
1 changed files with 6 additions and 2 deletions

View File

@ -28,10 +28,14 @@ function phpmailer_load_config(ConfigFileManager $loader)
}
/**
* @param IEmail $email
* @param null|IEmail $email
*/
function phpmailer_emailer_send_prepare(IEmail &$email)
function phpmailer_emailer_send_prepare(?IEmail &$email)
{
if ($email === null) {
return;
}
// Passing `true` enables exceptions
$mailer = new PHPMailer(true);
try {