mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
returns default on exception
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
parent
5f0c406e42
commit
addd678682
1 changed files with 7 additions and 1 deletions
|
|
@ -292,11 +292,17 @@ class AppConfig implements IAppConfig {
|
|||
string $default = '',
|
||||
?bool $lazy = false
|
||||
): string {
|
||||
try {
|
||||
$lazy = ($lazy === null) ? $this->isLazy($app, $key) : $lazy;
|
||||
} catch (AppConfigUnknownKeyException $e) {
|
||||
return $default;
|
||||
}
|
||||
|
||||
return $this->getTypedValue(
|
||||
$app,
|
||||
$key,
|
||||
$default,
|
||||
($lazy === null) ? $this->isLazy($app, $key) : $lazy,
|
||||
$lazy,
|
||||
self::VALUE_MIXED
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue