Add workaround for #3163
This commit is contained in:
parent
2efdf63a32
commit
912f278a48
|
|
@ -1334,6 +1334,10 @@ class PHPMailer
|
|||
*/
|
||||
public function setFrom($address, $name = '', $auto = true)
|
||||
{
|
||||
if (is_null($name)) {
|
||||
//Helps avoid a deprecation warning in the preg_replace() below
|
||||
$name = '';
|
||||
}
|
||||
$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().
|
||||
|
|
|
|||
Loading…
Reference in New Issue