Merge pull request #9681 from annando/fatal-php8
Quit when message is empty
This commit is contained in:
commit
5649861fde
1 changed files with 4 additions and 0 deletions
|
@ -188,6 +188,10 @@ class HTML
|
|||
$message = str_replace(["\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"], ["<", ">", "<br />", " ", ""], $message);
|
||||
$message = preg_replace('= [\s]*=i', " ", $message);
|
||||
|
||||
if (empty($message)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@$doc->loadHTML($message, LIBXML_HTML_NODEFDTD);
|
||||
|
||||
self::tagToBBCode($doc, 'html', [], "", "");
|
||||
|
|
Loading…
Reference in a new issue