af_readability: construct readability object inside try-catch block

This commit is contained in:
Andrew Dolgov 2019-02-21 06:52:15 +03:00
parent bb4d3bb2f1
commit fd8f8c7b3e
1 changed files with 2 additions and 2 deletions

View File

@ -176,9 +176,9 @@ class Af_Readability extends Plugin {
$tmp = $tmpdoc->saveHTML(); $tmp = $tmpdoc->saveHTML();
} }
try {
$r = new Readability(new Configuration()); $r = new Readability(new Configuration());
try {
if ($r->parse($tmp)) { if ($r->parse($tmp)) {
$tmpxpath = new DOMXPath($r->getDOMDOcument()); $tmpxpath = new DOMXPath($r->getDOMDOcument());