From 349c4229fdaf22923262e4d0cfc5a1cd1432c4c3 Mon Sep 17 00:00:00 2001 From: kpn3m0 Date: Tue, 14 May 2013 15:32:36 +0300 Subject: [PATCH] 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. --- classes/feedparser.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } } -- 2.39.5