mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
fix several issues reported by phpstan
This commit is contained in:
@@ -19,9 +19,7 @@ class Af_Fsckportal extends Plugin {
|
||||
|
||||
$doc = new DOMDocument();
|
||||
|
||||
@$doc->loadHTML('<?xml encoding="UTF-8">' . $article["content"]);
|
||||
|
||||
if ($doc) {
|
||||
if (@$doc->loadHTML('<?xml encoding="UTF-8">' . $article["content"])) {
|
||||
$xpath = new DOMXPath($doc);
|
||||
$entries = $xpath->query('(//img[@src]|//a[@href])');
|
||||
|
||||
@@ -34,7 +32,6 @@ class Af_Fsckportal extends Plugin {
|
||||
}
|
||||
|
||||
$article["content"] = $doc->saveHTML();
|
||||
|
||||
}
|
||||
|
||||
return $article;
|
||||
|
||||
Reference in New Issue
Block a user