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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user