From 93fd85df6f73732d3a6ed280d26224e1877c954f Mon Sep 17 00:00:00 2001 From: wn_ Date: Fri, 12 Aug 2022 14:13:26 +0000 Subject: Switch to direct type declarations of class properties. --- classes/mailer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'classes/mailer.php') diff --git a/classes/mailer.php b/classes/mailer.php index 60b1ce4fd..76c9abf8e 100644 --- a/classes/mailer.php +++ b/classes/mailer.php @@ -1,8 +1,6 @@ $params -- cgit v1.2.3 From 3487c922b3f34449fecdddebe1fd2ee3b8c42e65 Mon Sep 17 00:00:00 2001 From: wn_ Date: Fri, 12 Aug 2022 15:31:19 +0000 Subject: 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 --- classes/mailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/mailer.php') 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)); -- cgit v1.2.3