aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2024-10-17 20:47:16 -0100
committerMaxence Lange <maxence@artificial-owl.com>2024-10-17 20:50:19 -0100
commita1772adfcc6df9112d4596f499b36efd04293427 (patch)
tree29d504208742f552641cb4d673cc42c2acd77c64
parent40fd76f69e601ab5579e8ce9b81318d3924dd463 (diff)
downloadnextcloud-server-fix/noid/appconfig-setmixed-on-typed.tar.gz
nextcloud-server-fix/noid/appconfig-setmixed-on-typed.zip
fix(appconfig): fix type if known while using deprecated methodfix/noid/appconfig-setmixed-on-typed
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--lib/private/AppConfig.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index b1fde7c4965..2a6b5ba483c 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -732,6 +732,14 @@ class AppConfig implements IAppConfig {
}
if ($this->hasKey($app, $key, $lazy)) {
+ // if current set is using deprecated method (using MIXED) but config is typed in db, we fix the type.
+ if ($this->isTyped(self::VALUE_MIXED, $type)) {
+ $type = $this->getValueType($app, $key, $lazy);
+ if ($sensitive) {
+ $type = $type | self::VALUE_SENSITIVE;
+ }
+ }
+
/**
* no update if key is already known with set lazy status and value is
* not different, unless sensitivity is switched from false to true.