af_readability: construct readability object inside try-catch block
This commit is contained in:
parent
bb4d3bb2f1
commit
fd8f8c7b3e
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue