From 4ad04ee227dd7d704f417aaf9d6762f5cfdf4c1f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 29 Oct 2013 12:15:26 +0400 Subject: report all libxml errors in updater debug output force utf8 encoding if devforceupdate is on parser: try to convert non-unicode feeds with specified encoding to utf8 before trying to remove dangling utf8 characters in case of utf8-related libxml errors because doing so produces garbage content --- include/rssfuncs.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/rssfuncs.php') diff --git a/include/rssfuncs.php b/include/rssfuncs.php index bfbec0919..bc6048217 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -1110,7 +1110,13 @@ $error_msg = db_escape_string(mb_substr($rss->error(), 0, 245)); - _debug("error fetching feed: $error_msg", $debug_enabled); + _debug("fetch error: $error_msg", $debug_enabled); + + if (count($rss->errors()) > 1) { + foreach ($rss->errors() as $error) { + _debug("+ $error"); + } + } db_query( "UPDATE ttrss_feeds SET last_error = '$error_msg', -- cgit v1.2.3