Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(userconfig): Don't fail the precondition if the value is not set …
…at all

Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Nov 19, 2024
commit 394febb5d9f1ada1c6dfd0316a6a994b87c7148a
2 changes: 1 addition & 1 deletion lib/private/AllConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function setUserValue($userId, $appName, $key, $value, $preCondition = nu
$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) {
Expand Down
Loading