Supree the warning of DomDocument::loadHTML

pull/69/head
Domovoy 2012-07-23 21:22:20 +02:00
parent 7f34be5a9a
commit 47a5a5c03a
1 changed files with 3 additions and 1 deletions

View File

@ -70,7 +70,9 @@ function get_body_length($body) {
$string = trim($body); $string = trim($body);
// We need to get rid of hidden tags (display: none) // 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); $xpath = new DOMXPath($dom);
/* /*