diff options
| author | Andrew Dolgov <noreply@fakecake.org> | 2019-02-21 06:52:15 +0300 |
|---|---|---|
| committer | Andrew Dolgov <noreply@fakecake.org> | 2019-02-21 06:52:15 +0300 |
| commit | fd8f8c7b3e612ffe394dbb62fc1036ac2277473e (patch) | |
| tree | c21938efedcd9f7a056c298cf8f5b46d98f683e4 /plugins | |
| parent | bb4d3bb2f1ef7b63293c97bfc45abab46e5cedaa (diff) | |
af_readability: construct readability object inside try-catch block
Diffstat (limited to 'plugins')
| -rwxr-xr-x | plugins/af_readability/init.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 3cf8c9627..c44ad89ef 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -176,9 +176,9 @@ class Af_Readability extends Plugin { $tmp = $tmpdoc->saveHTML(); } - $r = new Readability(new Configuration()); - try { + $r = new Readability(new Configuration()); + if ($r->parse($tmp)) { $tmpxpath = new DOMXPath($r->getDOMDOcument()); |