mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-10-31 21:33:00 +00:00
Bugfix: Don't upgrade settings if they have a value of null
This commit is contained in:
parent
a49ccccbcc
commit
8a67df8ec4
2 changed files with 3 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
build.*/
|
||||||
_docpress/
|
_docpress/
|
||||||
build/
|
build/
|
||||||
!build/index.php
|
!build/index.php
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue