diff --git a/app/classes/config.php b/app/classes/config.php index d2ab502..850f119 100644 --- a/app/classes/config.php +++ b/app/classes/config.php @@ -17,8 +17,16 @@ class Config { // value is without quotes, because it could be true/false $pattern = "/(['\"]{$key}['\"]\s*=>\s*)([^,]+),/"; - // prepare the value and replace it - $replacementValue = var_export($newValue, true); + // prepare the value, treating booleans as 'true' or 'false' + if ($newValue === 1) { + $replacementValue = 'true'; + } elseif ($newValue === 0) { + $replacementValue = 'false'; + } else { + $replacementValue = var_export($newValue, true); + } + + // value replacing $config_contents = preg_replace($pattern, "$1{$replacementValue},", $config_contents); } diff --git a/app/helpers/render.php b/app/helpers/render.php index 335754b..a909fc6 100644 --- a/app/helpers/render.php +++ b/app/helpers/render.php @@ -57,6 +57,7 @@ function editConfig($configPart, $indent, $platform=false, $parent='') { ?>