summaryrefslogtreecommitdiff
path: root/classes/feedparser.php
diff options
context:
space:
mode:
authorkpn3m0 <[email protected]>2013-05-14 15:32:36 +0300
committerkpn3m0 <[email protected]>2013-05-14 15:32:36 +0300
commit349c4229fdaf22923262e4d0cfc5a1cd1432c4c3 (patch)
tree0e47b9ffce5eddd6d5a9cfc048fd4faa23638f96 /classes/feedparser.php
parent4128abee48fa992b8e25897a88b83bec18fb4455 (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.
Diffstat (limited to 'classes/feedparser.php')
-rw-r--r--classes/feedparser.php8
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;
}
}