From a1772adfcc6df9112d4596f499b36efd04293427 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 17 Oct 2024 20:47:16 -0100 Subject: [PATCH] fix(appconfig): fix type if known while using deprecated method Signed-off-by: Maxence Lange --- lib/private/AppConfig.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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.