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 21:37:30 +0200 |
commit | 303e504fcbd9b4b017a0774a62a0e9b65b24b6c8 (patch) | |
tree | 87d0c4b0ca044807affd4ff915a678e480a26e36 /lib | |
parent | 3c0f5d02bac478f028b74f4b488a3aa00b00feff (diff) | |
download | nextcloud-server-303e504fcbd9b4b017a0774a62a0e9b65b24b6c8.tar.gz nextcloud-server-303e504fcbd9b4b017a0774a62a0e9b65b24b6c8.zip |
only commit in case a transaction is active
Diffstat (limited to 'lib')
-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()); } |