Fix installation failure (#1664)

* Fix installation failure

* fix missing secret

* Apply suggestions from code review
This commit is contained in:
Lu Fei 2023-12-31 16:10:05 +08:00 committed by GitHub
parent 3caebb3b20
commit e306960db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,6 +169,13 @@ class Options extends Base
$themeOptions = $this->tryDeserialize($options[$themeOptionsKey]);
$options = array_merge($options, $themeOptions);
}
} elseif (function_exists('install_get_default_options')) {
$defaultOptions = install_get_default_options();
$initOptionKeys = ['routingTable', 'plugins', 'charset', 'contentType', 'timezone', 'installed', 'generator', 'siteUrl', 'lang', 'secret'];
foreach ($initOptionKeys as $option) {
$options[$option] = $defaultOptions[$option];
}
}
$this->push($options);