aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-11-19 18:02:22 +0100
committerJoas Schilling <coding@schilljs.com>2024-11-19 18:02:22 +0100
commit394febb5d9f1ada1c6dfd0316a6a994b87c7148a (patch)
tree3e0d80bbec76992f61e3adec5eaa7381006d0108 /lib
parent4d85f44c9f3c73ed13434e450f97718a29ea2e66 (diff)
downloadnextcloud-server-394febb5d9f1ada1c6dfd0316a6a994b87c7148a.tar.gz
nextcloud-server-394febb5d9f1ada1c6dfd0316a6a994b87c7148a.zip
fix(userconfig): Don't fail the precondition if the value is not set at allbugfix/47658/dont-fail-precondition-if-unset
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AllConfig.php2
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) {