aboutsummaryrefslogtreecommitdiff
path: root/app/Models/SystemConfiguration.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-03-14 22:44:51 +0100
committerGravatar GitHub <noreply@github.com> 2024-03-14 22:44:51 +0100
commitcf29ca19c029f6af8dc413f7001bd104ca17999d (patch)
treef31ba3325271dfb9f445b3d68689df3f544deb5d /app/Models/SystemConfiguration.php
parentc0db581f2b8cf7bcf8aa43b5a51599a56544d864 (diff)
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
Diffstat (limited to 'app/Models/SystemConfiguration.php')
-rw-r--r--app/Models/SystemConfiguration.php8
1 files changed, 6 insertions, 2 deletions
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());
+ }
}
}