Merge pull request #9953 from realkinetix/php8fatal
PHP 8 fatal messages - Quit when message is empty similar to #9681
This commit is contained in:
commit
22a1e3cba4
|
@ -167,6 +167,10 @@ class HTML
|
|||
|
||||
$message = mb_convert_encoding($message, 'HTML-ENTITIES', "UTF-8");
|
||||
|
||||
if (empty($message)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@$doc->loadHTML($message, LIBXML_HTML_NODEFDTD);
|
||||
|
||||
XML::deleteNode($doc, 'style');
|
||||
|
@ -588,6 +592,10 @@ class HTML
|
|||
|
||||
$message = mb_convert_encoding($message, 'HTML-ENTITIES', "UTF-8");
|
||||
|
||||
if (empty($message)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@$doc->loadHTML($message, LIBXML_HTML_NODEFDTD);
|
||||
|
||||
$message = $doc->saveHTML();
|
||||
|
|
|
@ -1754,6 +1754,10 @@ class Probe
|
|||
*/
|
||||
public static function getFeedLink(string $url, string $body)
|
||||
{
|
||||
if (empty($body)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$doc = new DOMDocument();
|
||||
if (!@$doc->loadHTML($body)) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user