diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-11-19 19:05:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 19:05:35 +0100 |
commit | 9b11c4202f474d8cad13c78ee4515ab980a1017b (patch) | |
tree | 3e0d80bbec76992f61e3adec5eaa7381006d0108 | |
parent | 4d85f44c9f3c73ed13434e450f97718a29ea2e66 (diff) | |
parent | 394febb5d9f1ada1c6dfd0316a6a994b87c7148a (diff) | |
download | nextcloud-server-9b11c4202f474d8cad13c78ee4515ab980a1017b.tar.gz nextcloud-server-9b11c4202f474d8cad13c78ee4515ab980a1017b.zip |
Merge pull request #49386 from nextcloud/bugfix/47658/dont-fail-precondition-if-unset
fix(userconfig): Don't fail the precondition if the value is not set at all
-rw-r--r-- | lib/private/AllConfig.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php index bb15adf31b4..72af6c960a5 100644 --- a/lib/private/AllConfig.php +++ b/lib/private/AllConfig.php @@ -246,7 +246,7 @@ class AllConfig implements IConfig { $userPreferences = \OCP\Server::get(IUserConfig::class); if ($preCondition !== null) { try { - if ($userPreferences->getValueMixed($userId, $appName, $key) !== (string)$preCondition) { + if ($userPreferences->hasKey($userId, $appName, $key) && $userPreferences->getValueMixed($userId, $appName, $key) !== (string)$preCondition) { throw new PreConditionNotMetException(); } } catch (TypeConflictException) { |