mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #42847 from nextcloud/fix/42843/exception-on-their-own
exceptions on their own
This commit is contained in:
commit
0e40457b86
1 changed files with 10 additions and 2 deletions
|
|
@ -164,7 +164,11 @@ class AppConfig implements IAppConfig {
|
|||
$this->assertParams($app, $key);
|
||||
$this->loadConfig($lazy);
|
||||
|
||||
return $this->isTyped(self::VALUE_SENSITIVE, $this->valueTypes[$app][$key] ?? throw new AppConfigUnknownKeyException('unknown config key'));
|
||||
if (!isset($this->valueTypes[$app][$key])) {
|
||||
throw new AppConfigUnknownKeyException('unknown config key');
|
||||
}
|
||||
|
||||
return $this->isTyped(self::VALUE_SENSITIVE, $this->valueTypes[$app][$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -961,10 +965,14 @@ class AppConfig implements IAppConfig {
|
|||
$typeString = (string)$type;
|
||||
}
|
||||
|
||||
if (!isset($cache[$app][$key])) {
|
||||
throw new AppConfigUnknownKeyException('unknown config key');
|
||||
}
|
||||
|
||||
return [
|
||||
'app' => $app,
|
||||
'key' => $key,
|
||||
'value' => $cache[$app][$key] ?? throw new AppConfigUnknownKeyException('unknown config key'),
|
||||
'value' => $cache[$app][$key],
|
||||
'type' => $type,
|
||||
'lazy' => $lazy,
|
||||
'typeString' => $typeString,
|
||||
|
|
|
|||
Loading…
Reference in a new issue