summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-12-17 19:28:54 +0100
committerGitHub <noreply@github.com>2016-12-17 19:28:54 +0100
commitabf302bef8c81becbfcf1e059845cbaa70f219dc (patch)
treef3925a3c17ed69c5283c900214e99c138102676d /lib
parentdfc17c9ae1b9805e6c949a3ea8a71fce4e1fcb10 (diff)
parentfc67606d3942cdea7a8c75c8605e866a5dc87621 (diff)
downloadnextcloud-server-abf302bef8c81becbfcf1e059845cbaa70f219dc.tar.gz
nextcloud-server-abf302bef8c81becbfcf1e059845cbaa70f219dc.zip
Merge pull request #2722 from nextcloud/failed-to-create-share-fix
[downstream] commit transaction after select query
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/DefaultShareProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index fded7442d20..23e8db34d7f 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -162,7 +162,6 @@ class DefaultShareProvider implements IShareProvider {
$this->dbConn->beginTransaction();
$qb->execute();
$id = $this->dbConn->lastInsertId('*PREFIX*share');
- $this->dbConn->commit();
// Now fetch the inserted share and create a complete share object
$qb = $this->dbConn->getQueryBuilder();
@@ -172,6 +171,7 @@ class DefaultShareProvider implements IShareProvider {
$cursor = $qb->execute();
$data = $cursor->fetch();
+ $this->dbConn->commit();
$cursor->closeCursor();
if ($data === false) {