]> git.wh0rd.org Git - tt-rss.git/commitdiff
Feature #686
authorkpn3m0 <diassiorrok@dunflimblag.mailexpire.com>
Tue, 14 May 2013 12:32:36 +0000 (15:32 +0300)
committerkpn3m0 <diassiorrok@dunflimblag.mailexpire.com>
Tue, 14 May 2013 12:32:36 +0000 (15:32 +0300)
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

index d60db8a28b33a4788cf140f2a5aee904c4573e50..79c1fd72bc6745840611c208829a32cbd2430220 100644 (file)
@@ -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;
                }
        }