diff options
| author | wn_ <invalid@email.com> | 2024-11-26 16:50:51 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2024-11-26 16:50:51 +0000 |
| commit | b5777b5a7c64164b86652ca34556e5c17fca319f (patch) | |
| tree | 7625eae24db7151b8d4cd5b5008f4d3adaae4065 | |
| parent | d85bdcfd782d0a34c5d891a9a95907da32069429 (diff) | |
Add+use FeedParser::FEED_UNKNOWN
| -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; } |