1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-16 00:25:56 +00:00

fix some more warnings reported by phpstan

This commit is contained in:
Andrew Dolgov
2021-02-06 17:38:24 +03:00
parent b6e1a5c91a
commit c94f1b6ff8
8 changed files with 23 additions and 18 deletions

View File

@@ -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) {