fix PHPStan error in phpmailer addon
This commit is contained in:
parent
bbce8c345f
commit
21a7529a0e
1 changed files with 6 additions and 2 deletions
|
@ -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
|
// Passing `true` enables exceptions
|
||||||
$mailer = new PHPMailer(true);
|
$mailer = new PHPMailer(true);
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue