Skip to content

Commit

Permalink
PHP 8.1: Fixes Deprecated: null to string in MailTemplate.php (joomla…
Browse files Browse the repository at this point in the history
…#37384)

Fixes "Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in libraries/src/Mail/MailTemplate.php on line 297"
  • Loading branch information
beat authored Mar 30, 2022
1 parent fae6a22 commit 9d13d22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/src/Mail/MailTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public function send()
$this->mailer->addReplyTo($this->replyto->mail, $this->replyto->name);
}

if (trim($config->get('attachment_folder')))
if (trim($config->get('attachment_folder', '')))
{
$folderPath = rtrim(Path::check(JPATH_ROOT . '/' . $config->get('attachment_folder')), \DIRECTORY_SEPARATOR);

Expand Down

0 comments on commit 9d13d22

Please sign in to comment.