diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2024-09-15 21:29:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-15 21:29:14 +0200 |
commit | 90a6b8257920a5b950c319f9b3af54b66690531e (patch) | |
tree | bdcd299282ceae2b61ea9a87f7d3a5555cb73cc1 /lib/private | |
parent | fa355386f779428a90c40dbf6467c3d924bff24b (diff) | |
parent | 66a6b442b5543a571ba405d328651677774b699a (diff) | |
download | nextcloud-server-90a6b8257920a5b950c319f9b3af54b66690531e.tar.gz nextcloud-server-90a6b8257920a5b950c319f9b3af54b66690531e.zip |
Merge pull request #47940 from nextcloud/backport/47933/stable30
[stable30] fix(config): Throw PreconditionException always when it didn't match
Diffstat (limited to 'lib/private')
-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 58eee772fbf..d48de298fad 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -242,10 +242,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') |