synchronous feed update: catch PDO exceptions as to not break headlines output

This commit is contained in:
Andrew Dolgov 2017-12-10 21:10:19 +03:00
parent 83a052f1fa
commit 1c1fc17120
1 changed files with 5 additions and 1 deletions

View File

@ -202,7 +202,11 @@ class Feeds extends Handler_Protected {
$cache_images = $row["cache_images"];
if (!$cache_images && time() - $last_updated > 120) {
RSSUtils::update_rss_feed($feed, true);
try {
RSSUtils::update_rss_feed($feed, true);
} catch (PDOException $e) {
user_error("PDO Exception while doing on-demand feed update for $feed: " . $e->getMessage(), E_USER_NOTICE);
}
} else {
$sth = $this->pdo->prepare("UPDATE ttrss_feeds
SET last_updated = '1970-01-01', last_update_started = '1970-01-01'