diff options
author | kpn3m0 <[email protected]> | 2013-05-14 15:32:36 +0300 |
---|---|---|
committer | kpn3m0 <[email protected]> | 2013-05-14 15:32:36 +0300 |
commit | 349c4229fdaf22923262e4d0cfc5a1cd1432c4c3 (patch) | |
tree | 0e47b9ffce5eddd6d5a9cfc048fd4faa23638f96 | |
parent | 4128abee48fa992b8e25897a88b83bec18fb4455 (diff) |
Feature #686
If the feed cannot be parsed there is not particular error but always "Unknown/unsupported feed type". The patch uses the error from the XML parser which gives more detailed error reporting.
-rw-r--r-- | classes/feedparser.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/classes/feedparser.php b/classes/feedparser.php index d60db8a28..79c1fd72b 100644 --- a/classes/feedparser.php +++ b/classes/feedparser.php @@ -49,7 +49,9 @@ class FeedParser { $this->type = $this::FEED_ATOM; break; default: - $this->error = "Unknown/unsupported feed type"; + if( !isset($this->error) ){ + $this->error = "Unknown/unsupported feed type"; + } return; } @@ -121,7 +123,9 @@ class FeedParser { } } else { - $this->error = "Unknown/unsupported feed type"; + if( !isset($this->error) ){ + $this->error = "Unknown/unsupported feed type"; + } return; } } |