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/SystemConfiguration.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/Models/SystemConfiguration.php') diff --git a/app/Models/SystemConfiguration.php b/app/Models/SystemConfiguration.php index 3c9cc116d..522e475ea 100644 --- a/app/Models/SystemConfiguration.php +++ b/app/Models/SystemConfiguration.php @@ -30,9 +30,13 @@ declare(strict_types=1); */ final class FreshRSS_SystemConfiguration extends Minz_Configuration { - /** @throws Minz_ConfigurationNamespaceException */ + /** @throws Minz_FileNotExistException */ public static function init(string $config_filename, ?string $default_filename = null): FreshRSS_SystemConfiguration { parent::register('system', $config_filename, $default_filename); - return parent::get('system'); + try { + return parent::get('system'); + } catch (Minz_ConfigurationNamespaceException $ex) { + FreshRSS::killApp($ex->getMessage()); + } } } -- cgit v1.2.3