Skip to content

Commit

Permalink
returns default on exception
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl committed Jan 16, 2024
1 parent 5f0c406 commit addd678
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/private/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,17 @@ public function getValueMixed(
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
);
}
Expand Down

0 comments on commit addd678

Please sign in to comment.