From addd67868249023d99b724ba8887a08e59f468d4 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Tue, 16 Jan 2024 12:35:05 -0100 Subject: [PATCH] returns default on exception Signed-off-by: Maxence Lange --- lib/private/AppConfig.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index e8192530c1799..505d5c52696c5 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -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 ); }