Skip to content

Commit

Permalink
Don't allow testToEmailAddress to be false.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Kelty committed Feb 26, 2019
1 parent 8137933 commit 0a3ffd6
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 0a3ffd6

Please sign in to comment.