diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-23 20:13:19 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-07-23 20:13:19 +0200 |
commit | 363ba04f5ef2e863e2ef129d8ac90b0d85b023a6 (patch) | |
tree | b40cc108ab589e90f69f111124131f082da65312 /lib/private/db | |
parent | a547bf8fe6f05d6ca797b1944178de526a038cb2 (diff) | |
download | nextcloud-server-363ba04f5ef2e863e2ef129d8ac90b0d85b023a6.tar.gz nextcloud-server-363ba04f5ef2e863e2ef129d8ac90b0d85b023a6.zip |
only commit in case a transaction is active
Diffstat (limited to 'lib/private/db')
-rw-r--r-- | lib/private/db/migrator.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/db/migrator.php b/lib/private/db/migrator.php index 6443cf4ed48..d05f8455551 100644 --- a/lib/private/db/migrator.php +++ b/lib/private/db/migrator.php @@ -110,7 +110,9 @@ class Migrator { $this->dropTable($tmpName); } catch (DBALException $e) { // pgsql needs to commit it's failed transaction before doing anything else - $this->connection->commit(); + if ($this->connection->isTransactionActive()) { + $this->connection->commit(); + } $this->dropTable($tmpName); throw new MigrationException($table->getName(), $e->getMessage()); } |