From 47a5a5c03a78e829ece69912deb78ad3e3af235e Mon Sep 17 00:00:00 2001 From: Domovoy Date: Mon, 23 Jul 2012 21:22:20 +0200 Subject: [PATCH] Supree the warning of DomDocument::loadHTML --- showmore/showmore.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/showmore/showmore.php b/showmore/showmore.php index 5b0f14a0..096fd3f7 100755 --- a/showmore/showmore.php +++ b/showmore/showmore.php @@ -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); /* -- 2.39.5