From cf29ca19c029f6af8dc413f7001bd104ca17999d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 14 Mar 2024 22:44:51 +0100 Subject: Fix crash during update of existing install (#6205) fix https://github.com/FreshRSS/FreshRSS/issues/6204 Mess due to https://github.com/FreshRSS/FreshRSS/pull/5511 --- app/Models/UserConfiguration.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/Models/UserConfiguration.php') diff --git a/app/Models/UserConfiguration.php b/app/Models/UserConfiguration.php index 7ccaa2671..0b02960c4 100644 --- a/app/Models/UserConfiguration.php +++ b/app/Models/UserConfiguration.php @@ -75,10 +75,14 @@ declare(strict_types=1); final class FreshRSS_UserConfiguration extends Minz_Configuration { use FreshRSS_FilterActionsTrait; - /** @throws Minz_ConfigurationNamespaceException */ + /** @throws Minz_FileNotExistException */ public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_UserConfiguration { parent::register('user', $config_filename, $default_filename); - return parent::get('user'); + try { + return parent::get('user'); + } catch (Minz_ConfigurationNamespaceException $ex) { + FreshRSS::killApp($ex->getMessage()); + } } /** -- cgit v1.2.3