mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-16 21:38:51 -04:00
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
This commit is contained in:
committed by
GitHub
parent
6813e16e95
commit
412b60ca83
@@ -15,6 +15,9 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable
|
||||
}
|
||||
|
||||
protected function addColumn($name) {
|
||||
if ($this->pdo->inTransaction()) {
|
||||
$this->pdo->commit();
|
||||
}
|
||||
Minz_Log::warning(__method__ . ': ' . $name);
|
||||
try {
|
||||
if ($name === 'kind') { //v1.20.0
|
||||
|
||||
@@ -62,6 +62,9 @@ SQL;
|
||||
}
|
||||
|
||||
protected function addColumn(string $name) {
|
||||
if ($this->pdo->inTransaction()) {
|
||||
$this->pdo->commit();
|
||||
}
|
||||
Minz_Log::warning(__method__ . ': ' . $name);
|
||||
try {
|
||||
if ($name === 'attributes') { //v1.20.0
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user