Skip to content

Commit

Permalink
fix(appconfig): fix type if known while using deprecated method
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Oct 17, 2024
1 parent 40fd76f commit a1772ad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/private/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,14 @@ private function setTypedValue(
}

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.
Expand Down

0 comments on commit a1772ad

Please sign in to comment.