- Issue created by @mably
The warning is generated by the following code in Maillog.php
file when running on PHP 8.1:
$output = $this->t('A mail has been sent: <br/> [Subject] => @subject <br/> [From] => @from <br/> [To] => @to <br/> [Reply-To] => @reply <br/> <pre> [Header] => @header <br/> [Body] => @body </pre>', [
'@subject' => $message['subject'],
'@from' => $message['from'],
'@to' => $message['to'],
'@reply' => isset($message['reply_to']) ? $message['reply_to'] : NULL,
'@header' => $header_output,
'@body' => $message['body'],
]);
\Drupal::messenger()->addStatus($output, TRUE);
Replace NULL
by an empty string:
'@reply' => isset($message['reply_to']) ? $message['reply_to'] : '',
Active
1.0
Code