mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-16 04:59:42 +01:00
Updated send_mail to be compatible with php 8.x
This commit is contained in:
@@ -250,11 +250,7 @@ function send_mail($to, $body, $subject, $fromAddress, $fromName, $bcc = '')
|
||||
$body = str_replace(["\n", "\0"], ["\r\n", ''], $body);
|
||||
|
||||
// Change the line breaks used in the headers according to OS
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) == 'MAC')
|
||||
{
|
||||
$headers = str_replace("\r\n", "\r", $headers);
|
||||
}
|
||||
elseif (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN')
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN' && version_compare(PHP_VERSION, '8.0.0', '<'))
|
||||
{
|
||||
$headers = str_replace("\r\n", "\n", $headers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user