From 2e9adf0d062ea462521adf04a19ab4a7adb9a440 Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 17 Dec 2024 20:32:09 +0000 Subject: [PATCH] Fixed migrations being impossible to run on a clean database. --- src/SiteInfo.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/SiteInfo.php b/src/SiteInfo.php index 660aaea..32abb8d 100644 --- a/src/SiteInfo.php +++ b/src/SiteInfo.php @@ -1,18 +1,28 @@ props = $config->getValues([ - ['name:s', 'Misuzu'], - 'desc:s', - 'url:s', - 'ext_logo:s', - ]); + try { + $this->props = $config->getValues([ + ['name:s', 'Misuzu'], + 'desc:s', + 'url:s', + 'ext_logo:s', + ]); + } catch(RuntimeException $ex) { + $this->props = [ + 'name' => 'Misuzu', + 'desc' => '', + 'url' => '', + 'ext_logo' => '', + ]; + } } public string $name {