diff options
| author | 2014-11-12 22:23:59 +0100 | |
|---|---|---|
| committer | 2014-11-12 22:23:59 +0100 | |
| commit | 56ac35095a6923661453916c472e117643cdea84 (patch) | |
| tree | f370563523fb7a0ee17899bc7486e25fb39bd877 /lib/SimplePie/SimplePie.php | |
| parent | 2cbad0c1d7a66f456873c458c21038a55b7147a2 (diff) | |
Better error message for inaccessible feeds
https://github.com/FreshRSS/FreshRSS/issues/456
Diffstat (limited to 'lib/SimplePie/SimplePie.php')
| -rw-r--r-- | lib/SimplePie/SimplePie.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php index 84001dd9a..dc4bbb6cb 100644 --- a/lib/SimplePie/SimplePie.php +++ b/lib/SimplePie/SimplePie.php @@ -1582,13 +1582,15 @@ class SimplePie if (!$locate->is_feed($file)) { + $copyStatusCode = $file->status_code; //FreshRSS + $copyContentType = $file->headers['content-type']; //FreshRSS // We need to unset this so that if SimplePie::set_file() has been called that object is untouched unset($file); try { if (!($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds))) { - $this->error = "A feed could not be found at $this->feed_url. A feed with an invalid mime type may fall victim to this error, or " . SIMPLEPIE_NAME . " was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed."; + $this->error = "A feed could not be found at `$this->feed_url`; the status code is `$copyStatusCode` and content-type is `$copyContentType`"; //FreshRSS $this->registry->call('Misc', 'error', array($this->error, E_USER_NOTICE, __FILE__, __LINE__)); return false; } |
