Merge pull request 'Handle fetch issues in 'RSSUtils::update_basic_info'.' (#101) from wn/tt-rss:bugfix/handle-failed-basic-info-fetch into master
Reviewed-on: https://dev.tt-rss.org/tt-rss/tt-rss/pulls/101
This commit is contained in:
commit
fcfcb69a2e
|
@ -316,6 +316,7 @@ class RSSUtils {
|
||||||
|
|
||||||
$feed_data = trim($feed_data);
|
$feed_data = trim($feed_data);
|
||||||
|
|
||||||
|
if ($feed_data) {
|
||||||
$rss = new FeedParser($feed_data);
|
$rss = new FeedParser($feed_data);
|
||||||
$rss->init();
|
$rss->init();
|
||||||
|
|
||||||
|
@ -324,6 +325,11 @@ class RSSUtils {
|
||||||
'title' => mb_substr(clean($rss->get_title()), 0, 199),
|
'title' => mb_substr(clean($rss->get_title()), 0, 199),
|
||||||
'site_url' => mb_substr(UrlHelper::rewrite_relative($feed->feed_url, clean($rss->get_link())), 0, 245),
|
'site_url' => mb_substr(UrlHelper::rewrite_relative($feed->feed_url, clean($rss->get_link())), 0, 245),
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
Debug::log(sprintf("unable to parse feed for basic info: %s", $rss->error()), Debug::LOG_VERBOSE);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Debug::log(sprintf("unable to fetch feed for basic info: %s [%s]", UrlHelper::$fetch_last_error, UrlHelper::$fetch_last_error_code), Debug::LOG_VERBOSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue