fixing ValueError: str_repeat(): Argument #2 ($times) must be greater than or equal to 0

fixes 1894a19a86
This commit is contained in:
ralf 2023-04-27 11:00:52 +02:00
parent 1b632b8649
commit 5db8883db6

View File

@ -288,8 +288,8 @@ class Html
{
$len_legend = strlen($legend = html_entity_decode($matches[1], ENT_QUOTES|ENT_SUBSTITUTE, $displayCharset));
$content = preg_replace('/<([^@> ]+@[^> ]+)>/', '#lower#than#$1#greater#than#', $matches[2]);
return "<br>".str_repeat('-', min(0, (64-$len_legend-2)>>1)).' '.$legend.' '.
str_repeat('-', min(0, (64-$len_legend-2+1)>>1))."<br>".
return "<br>".str_repeat('-', max(0, (64-$len_legend-2)>>1)).' '.$legend.' '.
str_repeat('-', max(0, (64-$len_legend-2+1)>>1))."<br>".
$content."<br>".str_repeat('-', 64)."<br>";
}, $_html);