forked from extern/egroupware
fix PHP 8.x TypeError sending mail
This commit is contained in:
parent
99588796da
commit
ced6c77f46
@ -283,13 +283,13 @@ class Html
|
|||||||
$_html = preg_replace($Rules, $Replace, $_html);
|
$_html = preg_replace($Rules, $Replace, $_html);
|
||||||
|
|
||||||
// replace fieldset with legend used for original message header
|
// replace fieldset with legend used for original message header
|
||||||
$_html = preg_replace_callback('#<fieldset[^>]*>\s*<legend>(.*)</legend>\s*(.*)\s*</fieldset>#sm',
|
$_html = preg_replace_callback('#<fieldset[^>]*>\s*<legend>(.*?)</legend>\s*(.*?)\s*</fieldset>#sm',
|
||||||
static function($matches)
|
static function($matches)
|
||||||
{
|
{
|
||||||
$len_legend = strlen($legend = $matches[1]);
|
$len_legend = strlen($legend = $matches[1]);
|
||||||
$content = preg_replace('/<([^@> ]+@[^> ]+)>/', '#lower#than#$1#greater#than#', $matches[2]);
|
$content = preg_replace('/<([^@> ]+@[^> ]+)>/', '#lower#than#$1#greater#than#', $matches[2]);
|
||||||
return "<br>".str_repeat('-', (64-$len_legend-2)>>1).' '.$legend.' '.str_repeat('-', (64-$len_legend-2+1)>>1)."<br>".
|
return "<br>".str_repeat('-', (64-$len_legend-2)>>1).' '.$legend.' '.str_repeat('-', (64-$len_legend-2+1)>>1)."<br>".
|
||||||
$content.str_repeat('-', 64)."<br>";
|
$content."<br>".str_repeat('-', 64)."<br>";
|
||||||
}, $_html);
|
}, $_html);
|
||||||
|
|
||||||
// removing carriage return linefeeds, preserve those enclosed in <pre> </pre> tags
|
// removing carriage return linefeeds, preserve those enclosed in <pre> </pre> tags
|
||||||
|
Loading…
Reference in New Issue
Block a user