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