aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2024-09-16 09:11:25 +0200
committerGitHub <noreply@github.com>2024-09-16 09:11:25 +0200
commit6e576e1fbdefd22384532e51944f952211018eb7 (patch)
treed19f4738e2e584b34b75ccfc377759e4d9ae2945 /lib
parentba94d22a630f25d8424ca8ec6ca93887f716e53d (diff)
parentbc750a1d09daa8e0db7a1b61794c2ff7df19a279 (diff)
downloadnextcloud-server-6e576e1fbdefd22384532e51944f952211018eb7.tar.gz
nextcloud-server-6e576e1fbdefd22384532e51944f952211018eb7.zip
Merge pull request #47941 from nextcloud/backport/47933/stable29
[stable29] fix(config): Throw PreconditionException always when it didn't match
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AllConfig.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index de1c19c953a..f0169fee18d 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -269,10 +269,10 @@ class AllConfig implements IConfig {
$prevValue = $this->getUserValue($userId, $appName, $key, null);
if ($prevValue !== null) {
- if ($prevValue === (string)$value) {
- return;
- } elseif ($preCondition !== null && $prevValue !== (string)$preCondition) {
+ if ($preCondition !== null && $prevValue !== (string)$preCondition) {
throw new PreConditionNotMetException();
+ } elseif ($prevValue === (string)$value) {
+ return;
} else {
$qb = $this->connection->getQueryBuilder();
$qb->update('preferences')