1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:25:59 +00:00

fetch_file_contents: improve error handling

1. if request fails get error string from http  response status line
2. do not override http error with possible CURL/php specific last error
3. fix silent php error generated while processing response headers to get last modified value
This commit is contained in:
Andrew Dolgov
2017-10-30 13:13:10 +03:00
parent 8716ec20d6
commit 9d930af9e1
2 changed files with 31 additions and 29 deletions

View File

@@ -419,7 +419,7 @@ class RSSUtils {
$feed_data = trim($feed_data);
_debug("fetch done.", $debug_enabled);
_debug("source last modified: " . $fetch_last_modified);
_debug("source last modified: " . $fetch_last_modified, $debug_enabled);
if ($feed_data && $fetch_last_modified != $stored_last_modified) {
$last_modified_escaped = db_escape_string(substr($fetch_last_modified, 0, 245));