Skip to content
Snippets Groups Projects
Commit effa8aeb authored by JediKev's avatar JediKev Committed by Peter Rotich
Browse files

mailer: EmailAddress Object as Array

This address issue 4366 where sending a User a password reset email throws a
fatal error of "object of type EmailAddress cannot be used as an array".
This adds a switch case for EmailAddress to get the User's email address as
a string not an object.
parent 2dc08a9e
Branches
Tags
No related merge requests found
......@@ -434,6 +434,9 @@ class Mailer {
$recipient->getName(),
$recipient->getEmail()));
break;
case $recipient instanceof EmailAddress:
$mime->addTo($recipient->getAddress());
break;
default:
// Assuming email address.
$mime->addTo($recipient);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment