Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-02-22 11:49:01 +0300
committerJulius Härtl <jus@bitgrid.net>2019-03-01 22:56:59 +0300
commit901f1d43e98f64de00ab53e65d32fe0426635a91 (patch)
treedec989acd455fbdfaf1db012a5b5956faa8eaaca /lib
parent995cad0ceebc2efd1b10c0e9e16462ccca773aa8 (diff)
Don't throw on UniqueConstraintViolationException since a written value is okay enough
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Collaboration/Resources/Manager.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php
index 0555be5d7af..0d85db324b6 100644
--- a/lib/private/Collaboration/Resources/Manager.php
+++ b/lib/private/Collaboration/Resources/Manager.php
@@ -406,7 +406,10 @@ class Manager implements IManager {
'resource_id' => $query->createNamedParameter($resource->getId()),
'access' => $query->createNamedParameter($access),
]);
- $query->execute();
+ try {
+ $query->execute();
+ } catch (UniqueConstraintViolationException $e) {
+ }
}
public function cacheAccessForCollection(ICollection $collection, ?IUser $user, bool $access): void {
@@ -419,7 +422,10 @@ class Manager implements IManager {
'collection_id' => $query->createNamedParameter($collection->getId()),
'access' => $query->createNamedParameter($access),
]);
- $query->execute();
+ try {
+ $query->execute();
+ } catch (UniqueConstraintViolationException $e) {
+ }
}
public function invalidateAccessCacheForUser(?IUser $user): void {