From: kpn3m0 Date: Tue, 14 May 2013 12:32:36 +0000 (+0300) Subject: Feature #686 X-Git-Tag: 1.8~124^2^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=349c4229fdaf22923262e4d0cfc5a1cd1432c4c3;p=tt-rss.git 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. --- diff --git a/classes/feedparser.php b/classes/feedparser.php index d60db8a2..79c1fd72 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; } }