diff options
| author | 2022-09-19 11:51:44 +0200 | |
|---|---|---|
| committer | 2022-09-19 11:51:44 +0200 | |
| commit | 412b60ca8380dd760225574746207cf8e90a2b43 (patch) | |
| tree | 8bbbf6925b4ec3de7032f3ea58c0ce5696d23218 /app/Models/FeedDAO.php | |
| parent | 6813e16e95c631084029cc84f786acd87495c063 (diff) | |
Fix transaction rollbacks during auto-update (#4622)
#fix https://github.com/FreshRSS/FreshRSS/issues/4600
We first need to commit the SQL transaction before being able to auto-update.
Avoid error such as:
> 25P02: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 1b3d84c46..9f85fbc86 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -3,6 +3,9 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { protected function addColumn(string $name) { + if ($this->pdo->inTransaction()) { + $this->pdo->commit(); + } Minz_Log::warning(__method__ . ': ' . $name); try { if ($name === 'kind') { //v1.20.0 |
