summaryrefslogtreecommitdiff
path: root/classes/mailer.php
diff options
context:
space:
mode:
authorwn_ <[email protected]>2022-08-12 15:31:19 +0000
committerwn_ <[email protected]>2022-08-12 17:58:38 +0000
commit3487c922b3f34449fecdddebe1fd2ee3b8c42e65 (patch)
tree57b18bf1a6ec210aa26a80cf1f2d2fdf0888f5da /classes/mailer.php
parenta63c949a5522a8fdeae2dfa77bb39565727f7a0a (diff)
Replace use of 'array_merge' with the spread operator and 'array_push' in various places.
This isn't supported for arrays with string keys until PHP 8.1. https://wiki.php.net/rfc/spread_operator_for_array
Diffstat (limited to 'classes/mailer.php')
-rw-r--r--classes/mailer.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/mailer.php b/classes/mailer.php
index 76c9abf8e..ac5c641eb 100644
--- a/classes/mailer.php
+++ b/classes/mailer.php
@@ -45,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));