aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2024-09-16 09:11:59 +0200
committerGitHub <noreply@github.com>2024-09-16 09:11:59 +0200
commit1e87c3f17de14ee9a53d0db5212ebc9442d39b6c (patch)
treee8072ac822fdffcabbd80f086abdb1b146fcbf36 /lib
parent3abf9581dddae1de097080de9a5fa856e5cd1e5b (diff)
parent25d70bf77fd98a1f1c55ca7e55872d2ca73617f6 (diff)
downloadnextcloud-server-1e87c3f17de14ee9a53d0db5212ebc9442d39b6c.tar.gz
nextcloud-server-1e87c3f17de14ee9a53d0db5212ebc9442d39b6c.zip
Merge pull request #47942 from nextcloud/backport/47933/stable28
[stable28] 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 7a54de2b7bb..558b181050d 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -264,10 +264,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')