New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX Handle admin_email array config #10258
FIX Handle admin_email array config #10258
Conversation
e2d5471
to
7b5e025
Compare
// https://docs.silverstripe.org/en/4/developer_guides/email/#administrator-emails | ||
$adminEmail = $this->config()->get('admin_email'); | ||
if (is_array($adminEmail) && count($adminEmail) > 0) { | ||
$defaultFrom = array_keys($adminEmail)[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$defaultFrom = array_keys($adminEmail)[0]; | |
$defaultFrom = array_key_first($adminEmail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted, PHP 7.1 (which 4.9 supports) doesn't have the array_key_first, it's new with php 7.3.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok, I thought we dropped support below 7.4 now but didn't realise 4.9 still has it. All good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah 4.10 was when older PHP support was dropped.
7b5e025
to
5c02ea3
Compare
5c02ea3
to
204b39b
Compare
Issue #10257