mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Resolve #610 PHP 8.2
This commit is contained in:
parent
c199b63304
commit
f805ae53dc
1 changed files with 6 additions and 1 deletions
|
|
@ -4,6 +4,8 @@ namespace MailSo\Base\StreamFilters;
|
||||||
|
|
||||||
class LineEndings extends \php_user_filter
|
class LineEndings extends \php_user_filter
|
||||||
{
|
{
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
|
// public function filter($in, $out, &$consumed, bool $closing): int
|
||||||
public function filter($in, $out, &$consumed, $closing)
|
public function filter($in, $out, &$consumed, $closing)
|
||||||
{
|
{
|
||||||
while ($bucket = \stream_bucket_make_writeable($in)) {
|
while ($bucket = \stream_bucket_make_writeable($in)) {
|
||||||
|
|
@ -25,10 +27,13 @@ class LineEndings extends \php_user_filter
|
||||||
return PSFS_PASS_ON;
|
return PSFS_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public onClose(): void
|
||||||
|
// public onCreate(): bool
|
||||||
|
|
||||||
public static function appendTo($fp)
|
public static function appendTo($fp)
|
||||||
{
|
{
|
||||||
\stream_filter_append($fp, 'crlf', STREAM_FILTER_ALL);
|
\stream_filter_append($fp, 'crlf', STREAM_FILTER_ALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
\stream_filter_register('crlf', 'MailSo\\Base\\StreamFilters\\LineEndings');
|
\stream_filter_register('crlf', LineEndings::class);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue