]> git.mxchange.org Git - friendica-addons.git/commitdiff
Supree the warning of DomDocument::loadHTML
authorDomovoy <domovoy@errlock.org>
Mon, 23 Jul 2012 19:22:20 +0000 (21:22 +0200)
committerDomovoy <domovoy@errlock.org>
Mon, 23 Jul 2012 19:22:20 +0000 (21:22 +0200)
showmore/showmore.php

index 5b0f14a0c38fe39c7ecf954bde8a03bcad34acd1..096fd3f704b69e3f825daeffdc84048967e4beb0 100755 (executable)
@@ -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);
 
        /*