forked from friendica/friendica-addons
Supree the warning of DomDocument::loadHTML
This commit is contained in:
parent
7f34be5a9a
commit
47a5a5c03a
1 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,9 @@ function get_body_length($body) {
|
|||
$string = trim($body);
|
||||
|
||||
// We need to get rid of hidden tags (display: none)
|
||||
$dom = DomDocument::loadHTML($body);
|
||||
|
||||
// Get rid of the warning. It would be better to have some valid html as input
|
||||
$dom = @DomDocument::loadHTML($body);
|
||||
$xpath = new DOMXPath($dom);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue