diff options
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php index 4154d8d5e..f09d72cd0 100644 --- a/include/functions.php +++ b/include/functions.php @@ -592,8 +592,13 @@ if (get_schema_version() < 63) $profile_qpart = ""; $pdo = DB::pdo(); + $in_nested_tr = false; - $pdo->beginTransaction(); + try { + $pdo->beginTransaction(); + } catch (Exception $e) { + $in_nested_tr = true; + } $sth = $pdo->query("SELECT pref_name,def_value FROM ttrss_prefs"); @@ -630,7 +635,7 @@ } } - $pdo->commit(); + if (!$in_nested_tr) $pdo->commit(); } |