Do not attempt to send an email in Emails\Base::send() when $to is empty.
Actual behavior
EDD and its Emails\Base::send() method try to send an email even when the $to variable is empty.
It's a different question (and a bug in another place) why it's empty, but the all-inclusive solution for all possible cases would be not to send an email in such cases.
Bug Report
Expected behavior
Do not attempt to send an email in
Emails\Base::send()
when$to
is empty.Actual behavior
EDD and its
Emails\Base::send()
method try to send an email even when the$to
variable is empty. It's a different question (and a bug in another place) why it's empty, but the all-inclusive solution for all possible cases would be not to send an email in such cases.See this:
https://github.com/awesomemotive/easy-digital-downloads/blob/main/src/Emails/Base.php#L340
Information (if a specific version is affected):
PHP Version: 7.4 (but it doesn't matter)
EDD Version (or branch): 3.2.6 (but it doesn't matter)
WordPress Version: 6.4 (but it doesn't matter)