mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
fix PHP 8.x TypeError sending mail
This commit is contained in:
parent
234648e9fc
commit
85365b2f93
@ -283,13 +283,13 @@ class Html
|
||||
$_html = preg_replace($Rules, $Replace, $_html);
|
||||
|
||||
// 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)
|
||||
{
|
||||
$len_legend = strlen($legend = $matches[1]);
|
||||
$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>".
|
||||
$content.str_repeat('-', 64)."<br>";
|
||||
$content."<br>".str_repeat('-', 64)."<br>";
|
||||
}, $_html);
|
||||
|
||||
// removing carriage return linefeeds, preserve those enclosed in <pre> </pre> tags
|
||||
|
Loading…
Reference in New Issue
Block a user