Bugfix: Don't upgrade settings if they have a value of null

This commit is contained in:
Starbeamrainbowlabs 2019-05-11 22:52:08 +01:00
parent a49ccccbcc
commit 8a67df8ec4
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
build.*/
_docpress/
build/
!build/index.php

View File

@ -48,7 +48,8 @@ if($settings === null) {
// Fill in any missing properties
$settings_upgraded = false;
foreach($guiConfig as $key => $propertyData) {
if(!isset($settings->$key)) {
if(!property_exists($settings, $key)) {
error_log("[settings] Upgrading $key");
$settings->$key = $propertyData->default;
$settings_upgraded = true;
}