From be4e7b13403666fc477d4b563ea8c075d0fd2022 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 22 Feb 2021 14:41:09 +0300 Subject: fix several issues reported by phpstan --- plugins/af_fsckportal/init.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'plugins/af_fsckportal/init.php') diff --git a/plugins/af_fsckportal/init.php b/plugins/af_fsckportal/init.php index 04b77a15a..8caa617c6 100644 --- a/plugins/af_fsckportal/init.php +++ b/plugins/af_fsckportal/init.php @@ -19,9 +19,7 @@ class Af_Fsckportal extends Plugin { $doc = new DOMDocument(); - @$doc->loadHTML('' . $article["content"]); - - if ($doc) { + if (@$doc->loadHTML('' . $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; -- cgit v1.2.3-54-g00ecf