1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

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/ _docpress/
build/ build/
!build/index.php !build/index.php

View file

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