Closed bugfolder closed 3 years ago
Some situations were fixed by PR 42, but others are not and strings that happen to be equal to boolean values are not. The following test code shows some examples:
variable_get('coder_upgrade_test_bool', TRUE); variable_get('coder_upgrade_test_str1', "TRUE"); variable_get('coder_upgrade_test_str2', 'TRUE'); variable_get('coder_upgrade_test_str3', 'BLUE');
.install file contains:
$config->set('coder_upgrade_test_bool', update_variable_get('coder_upgrade_test_bool', TRUE)); $config->set('coder_upgrade_test_str1', update_variable_get('coder_upgrade_test_str1', '"TRUE"')); $config->set('coder_upgrade_test_str2', update_variable_get('coder_upgrade_test_str2', TRUE)); $config->set('coder_upgrade_test_str3', update_variable_get('coder_upgrade_test_str3', 'BLUE'));
.json file contains:
"coder_upgrade_test_bool": true, "coder_upgrade_test_str1": "\"TRUE\"", "coder_upgrade_test_str2": true, "coder_upgrade_test_str3": "BLUE",
In both cases, 2nd and 3rd are wrong; the values should be ordinary string values.
Fixed by https://github.com/backdrop-contrib/coder_upgrade/pull/53.
Some situations were fixed by PR 42, but others are not and strings that happen to be equal to boolean values are not. The following test code shows some examples:
.install file contains:
.json file contains:
In both cases, 2nd and 3rd are wrong; the values should be ordinary string values.