Skip to content

Commit cd06b24

Browse files
Merge pull request #52623 from nextcloud/feat/noid/get-value-type-from-lexicon
iAppConfig: getValueType() get data from lexicon if available
2 parents 8528916 + b3f52eb commit cd06b24

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/private/AppConfig.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,14 @@ private function getTypedValue(
488488
* @see VALUE_ARRAY
489489
*/
490490
public function getValueType(string $app, string $key, ?bool $lazy = null): int {
491+
$type = self::VALUE_MIXED;
492+
$ignorable = $lazy ?? false;
493+
$this->matchAndApplyLexiconDefinition($app, $key, $ignorable, $type);
494+
if ($type !== self::VALUE_MIXED) {
495+
// a modified $type means config key is set in Lexicon
496+
return $type;
497+
}
498+
491499
$this->assertParams($app, $key);
492500
$this->loadConfig($app, $lazy);
493501

0 commit comments

Comments
 (0)