1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-16 08:35:57 +00:00

better handle PDOExceptions during open transaction in feed update

This commit is contained in:
Andrew Dolgov
2018-11-03 15:00:58 +03:00
parent 5f66f872b6
commit 2c940c4861

View File

@@ -192,6 +192,13 @@ class RSSUtils {
RSSUtils::update_rss_feed($tline["id"], true, false);
} catch (PDOException $e) {
Logger::get()->log_error(E_USER_NOTICE, $e->getMessage(), $e->getFile(), $e->getLine(), $e->getTraceAsString());
try {
$pdo->rollback();
} catch (PDOException $e) {
// it doesn't matter if there wasn't actually anything to rollback, PDO Exception can be
// thrown outside of an active transaction during feed update
}
}
_debug_suppress(false);