Skip to content

Commit

Permalink
FIX Handle when fallback email address is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 5, 2025
1 parent cd7b692 commit 5dab480
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Extensions/ContentReviewDefaultSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ public function getReviewFrom()
}

// Fall back to admin email
return Config::inst()->get(Email::class, 'admin_email');
$adminEmail = Config::inst()->get(Email::class, 'admin_email');
if (is_array($adminEmail)) {
// may take the form of ['admin-email@mysite.text' => 'Admin email label']
// https://docs.silverstripe.org/en/5/developer_guides/email/#administrator-emails
return array_values(array_keys($adminEmail))[0];
}
}

/**
Expand Down

0 comments on commit 5dab480

Please sign in to comment.