fix(appconfig): fix type if known while using deprecated method

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2024-10-17 20:47:16 -01:00
parent 40fd76f69e
commit a1772adfcc

View file

@ -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.