diff options
author | fox <[email protected]> | 2022-08-17 19:38:15 +0300 |
---|---|---|
committer | fox <[email protected]> | 2022-08-17 19:38:15 +0300 |
commit | 60658be5bc35192f9b2d9aaf413454f29fe51316 (patch) | |
tree | d7f6aa1b6bf3eaa4d7a9601e46e15441bc737d9e /classes/mailer.php | |
parent | ec764f97e7e3e0fac20f93364c84dfa01651bf95 (diff) | |
parent | 0dbed700efa77355839a4d2cddf02f93203dc96f (diff) |
Merge pull request 'Use PHP 7.4 features' (#77) from wn/tt-rss:feature/php-7.4-stuff into master
Reviewed-on: https://dev.tt-rss.org/fox/tt-rss/pulls/77
Diffstat (limited to 'classes/mailer.php')
-rw-r--r-- | classes/mailer.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/classes/mailer.php b/classes/mailer.php index 60b1ce4fd..ac5c641eb 100644 --- a/classes/mailer.php +++ b/classes/mailer.php @@ -1,8 +1,6 @@ <?php class Mailer { - // TODO: class properties can be switched to PHP typing if/when the minimum PHP_VERSION is raised to 7.4.0+ - /** @var string */ - private $last_error = ""; + private string $last_error = ""; /** * @param array<string, mixed> $params @@ -47,7 +45,7 @@ class Mailer { $headers = [ "From: $from_combined", "Content-Type: text/plain; charset=UTF-8" ]; - $rc = mail($to_combined, $subject, $message, implode("\r\n", array_merge($headers, $additional_headers))); + $rc = mail($to_combined, $subject, $message, implode("\r\n", [...$headers, ...$additional_headers])); if (!$rc) { $this->set_error(error_get_last()['message'] ?? T_sprintf("Unknown error while sending mail. Hooks tried: %d.", $hooks_tried)); |