summaryrefslogtreecommitdiff
path: root/classes/feedparser.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-06 17:38:24 +0300
committerAndrew Dolgov <[email protected]>2021-02-06 17:38:24 +0300
commitc94f1b6ff8a2a82fa0d6ad725144c5380fd0df7b (patch)
tree4b75ab38e2145422f4de313986ee7b32f1a92ade /classes/feedparser.php
parentb6e1a5c91a0999a13eda4207fc23ff495637d697 (diff)
fix some more warnings reported by phpstan
Diffstat (limited to 'classes/feedparser.php')
-rw-r--r--classes/feedparser.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/feedparser.php b/classes/feedparser.php
index 9677164d3..daba271fb 100644
--- a/classes/feedparser.php
+++ b/classes/feedparser.php
@@ -53,7 +53,7 @@ class FeedParser {
$root = $xpath->query("(//atom03:feed|//atom:feed|//channel|//rdf:rdf|//rdf:RDF)");
- if ($root && $root->length > 0) {
+ if (!empty($root) && $root->length > 0) {
$root = $root->item(0);
if ($root) {
@@ -106,7 +106,7 @@ class FeedParser {
$articles = $xpath->query("//atom:entry");
- if (!$articles || $articles->length == 0)
+ if (empty($articles) || $articles->length == 0)
$articles = $xpath->query("//atom03:entry");
foreach ($articles as $article) {