diff options
| -rw-r--r-- | classes/FeedParser.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/FeedParser.php b/classes/FeedParser.php index 3c5e1e0a2..c288ffc91 100644 --- a/classes/FeedParser.php +++ b/classes/FeedParser.php @@ -25,6 +25,7 @@ class FeedParser { /** @var DOMXPath|null */ private $xpath; + const FEED_UNKNOWN = -1; const FEED_RDF = 0; const FEED_RSS = 1; const FEED_ATOM = 2; @@ -76,10 +77,10 @@ class FeedParser { 'rdf:rdf' => $this::FEED_RDF, 'channel' => $this::FEED_RSS, 'feed', 'atom:feed' => $this::FEED_ATOM, - default => null, + default => $this::FEED_UNKNOWN, }; - if ($this->type === null) { + if ($this->type === $this::FEED_UNKNOWN) { $this->error ??= 'Unknown/unsupported feed type'; return; } |