]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/3rdparty/libraries/readability/Readability.php
fixes #963 and use our own readability.php file for mobiClass
[github/wallabag/wallabag.git] / inc / 3rdparty / libraries / readability / Readability.php
index 4fa3ba63d4d2aaadede82fc464dcb4e59392aee0..a30012cedff207a6c59d5b61eca64dde62de0df7 100755 (executable)
@@ -46,6 +46,7 @@
 
 // This class allows us to do JavaScript like assignements to innerHTML
 require_once(dirname(__FILE__).'/JSLikeHTMLElement.php');
+libxml_use_internal_errors(true);
 
 // Alternative usage (for testing only!)
 // uncomment the lines below and call Readability.php in your browser 
@@ -697,7 +698,7 @@ class Readability
                $articleContent        = $this->dom->createElement('div');
                $articleContent->setAttribute('id', 'readability-content');
                $siblingScoreThreshold = max(10, ((int)$topCandidate->getAttribute('readability')) * 0.2);
-               $siblingNodes          = $topCandidate->parentNode->childNodes;
+               $siblingNodes          = @$topCandidate->parentNode->childNodes;
                if (!isset($siblingNodes)) {
                        $siblingNodes = new stdClass;
                        $siblingNodes->length = 0;
@@ -1148,4 +1149,4 @@ class Readability
        }
                
 }
-?>
\ No newline at end of file
+?>