This commit is contained in:
Marcus Bointon 2022-07-08 00:12:21 +02:00 committed by GitHub
parent 26371755e6
commit 10a6e3ec25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1288,7 +1288,7 @@ class PHPMailer
*/
public function setFrom($address, $name = '', $auto = true)
{
$address = trim((string) $address); //trim(): Passing null to parameter #1 ($string) of type string is deprecated from PHP8.1 ...
$address = trim((string)$address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
//Don't validate now addresses with IDN. Will be done in send().
$pos = strrpos($address, '@');