aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/libraries/readability/Readability.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/3rdparty/libraries/readability/Readability.php')
-rwxr-xr-xinc/3rdparty/libraries/readability/Readability.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/3rdparty/libraries/readability/Readability.php b/inc/3rdparty/libraries/readability/Readability.php
index 4fa3ba63..a30012ce 100755
--- a/inc/3rdparty/libraries/readability/Readability.php
+++ b/inc/3rdparty/libraries/readability/Readability.php
@@ -46,6 +46,7 @@
46 46
47// This class allows us to do JavaScript like assignements to innerHTML 47// This class allows us to do JavaScript like assignements to innerHTML
48require_once(dirname(__FILE__).'/JSLikeHTMLElement.php'); 48require_once(dirname(__FILE__).'/JSLikeHTMLElement.php');
49libxml_use_internal_errors(true);
49 50
50// Alternative usage (for testing only!) 51// Alternative usage (for testing only!)
51// uncomment the lines below and call Readability.php in your browser 52// uncomment the lines below and call Readability.php in your browser
@@ -697,7 +698,7 @@ class Readability
697 $articleContent = $this->dom->createElement('div'); 698 $articleContent = $this->dom->createElement('div');
698 $articleContent->setAttribute('id', 'readability-content'); 699 $articleContent->setAttribute('id', 'readability-content');
699 $siblingScoreThreshold = max(10, ((int)$topCandidate->getAttribute('readability')) * 0.2); 700 $siblingScoreThreshold = max(10, ((int)$topCandidate->getAttribute('readability')) * 0.2);
700 $siblingNodes = $topCandidate->parentNode->childNodes; 701 $siblingNodes = @$topCandidate->parentNode->childNodes;
701 if (!isset($siblingNodes)) { 702 if (!isset($siblingNodes)) {
702 $siblingNodes = new stdClass; 703 $siblingNodes = new stdClass;
703 $siblingNodes->length = 0; 704 $siblingNodes->length = 0;
@@ -1148,4 +1149,4 @@ class Readability
1148 } 1149 }
1149 1150
1150} 1151}
1151?> \ No newline at end of file 1152?>