Skip to content

Commit

Permalink
Merge pull request #3910 from timkelty/fix-false-testToEmailAddress
Browse files Browse the repository at this point in the history
Don't allow testToEmailAddress to be false
  • Loading branch information
brandonkelly authored Feb 26, 2019
2 parents 8137933 + 0a3ffd6 commit f6023b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ public function send($message)
}

// Apply the testToEmailAddress config setting
$testToEmailAddress = (array)Craft::$app->getConfig()->getGeneral()->testToEmailAddress;
$testToEmailAddress = Craft::$app->getConfig()->getGeneral()->testToEmailAddress;
if (!empty($testToEmailAddress)) {
$to = [];
foreach ($testToEmailAddress as $emailAddress => $name) {
foreach ((array)$testToEmailAddress as $emailAddress => $name) {
if (is_numeric($emailAddress)) {
$to[$name] = Craft::t('app', 'Test Recipient');
} else {
Expand Down

0 comments on commit f6023b9

Please sign in to comment.