mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -507,7 +507,7 @@ class Email extends Message
|
||||
}
|
||||
|
||||
if ($name !== $part->getContentId()) {
|
||||
$html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html, $count);
|
||||
$html = str_replace('cid:'.$name, 'cid:'.$part->getContentId(), $html);
|
||||
}
|
||||
$relatedParts[$name] = $part;
|
||||
$part->setName($part->getContentId())->asInline();
|
||||
|
||||
@@ -46,9 +46,9 @@ final class QpContentEncoder implements ContentEncoderInterface
|
||||
// transform =0D=0A to CRLF
|
||||
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string);
|
||||
|
||||
return match (\ord(substr($string, -1))) {
|
||||
0x09 => substr_replace($string, '=09', -1),
|
||||
0x20 => substr_replace($string, '=20', -1),
|
||||
return match ($string[-1] ?? '') {
|
||||
"\x09" => substr_replace($string, '=09', -1),
|
||||
"\x20" => substr_replace($string, '=20', -1),
|
||||
default => $string,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -183,9 +183,9 @@ class QpEncoder implements EncoderInterface
|
||||
{
|
||||
$string = str_replace(["\t=0D=0A", ' =0D=0A', '=0D=0A'], ["=09\r\n", "=20\r\n", "\r\n"], $string);
|
||||
|
||||
return match ($end = \ord(substr($string, -1))) {
|
||||
0x09,
|
||||
0x20 => substr_replace($string, self::QP_MAP[$end], -1),
|
||||
return match ($end = ($string[-1] ?? '')) {
|
||||
"\x09",
|
||||
"\x20" => substr_replace($string, self::QP_MAP[\ord($end)], -1),
|
||||
default => $string,
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -60,13 +60,15 @@ class MessagePart extends DataPart
|
||||
return $this->message->toIterable();
|
||||
}
|
||||
|
||||
public function __sleep(): array
|
||||
public function __serialize(): array
|
||||
{
|
||||
return ['message'];
|
||||
return ['message' => $this->message];
|
||||
}
|
||||
|
||||
public function __wakeup(): void
|
||||
public function __unserialize(array $data): void
|
||||
{
|
||||
$this->message = $data['message'] ?? $data["\0".self::class."\0message"];
|
||||
|
||||
$this->__construct($this->message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ $exts = [
|
||||
'html' => ['text/html'],
|
||||
'jar' => ['application/x-java-archive'],
|
||||
'jpg' => ['image/jpeg'],
|
||||
'js' => ['text/javascript'],
|
||||
'js' => ['text/javascript', 'application/javascript', 'application/x-javascript'],
|
||||
'keynote' => ['application/vnd.apple.keynote'],
|
||||
'key' => ['application/vnd.apple.keynote'],
|
||||
'm3u' => ['audio/x-mpegurl'],
|
||||
|
||||
Reference in New Issue
Block a user