summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-12-10 21:10:19 +0300
committerAndrew Dolgov <[email protected]>2017-12-10 21:10:19 +0300
commit1c1fc171203835410d82f3f895a28b0751cbcaa6 (patch)
tree4ce637abb1749871bdd3112d5d03cd4de0cf3467 /classes
parent83a052f1fa36e6bcebc6b6ee1ba6cfc9d9f480d0 (diff)
synchronous feed update: catch PDO exceptions as to not break headlines output
Diffstat (limited to 'classes')
-rwxr-xr-xclasses/feeds.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 7b5531464..e875eeb7f 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -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'