From 9d930af9e109884f219a2254dc444c7a943b1e6e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 30 Oct 2017 13:13:10 +0300 Subject: 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 --- classes/rssutils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/rssutils.php b/classes/rssutils.php index 30d35dfae..d6fe048f9 100644 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -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)); -- cgit v1.2.3