diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-09-16 09:11:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 09:11:59 +0200 |
commit | 1e87c3f17de14ee9a53d0db5212ebc9442d39b6c (patch) | |
tree | e8072ac822fdffcabbd80f086abdb1b146fcbf36 /lib | |
parent | 3abf9581dddae1de097080de9a5fa856e5cd1e5b (diff) | |
parent | 25d70bf77fd98a1f1c55ca7e55872d2ca73617f6 (diff) | |
download | nextcloud-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.php | 6 |
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') |