awesomemotive / easy-digital-downloads

Sell digital downloads through WordPress
https://easydigitaldownloads.com
GNU General Public License v2.0
863 stars 474 forks source link

Do not attempt to send emails when $to is empty #9721

Closed slaFFik closed 3 months ago

slaFFik commented 3 months ago

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)

robincornett commented 3 months ago

Thanks for the report, @slaFFik--this is something we are fixing in our 3.3.0 release.