Case-insensitive comparison for importing boolean values (Yes/No)

This commit is contained in:
nathangray 2016-07-21 11:55:47 -06:00
parent 246683331b
commit 4aad06e61d

View File

@ -383,7 +383,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
}
foreach((array)$fields['select-bool'] as $name) {
if($record[$name] != null && $record[$name] != '') {
$record[$name] = ($record[$name] == lang('Yes') || $record[$name] == '1' ? 1 : 0);
$record[$name] = (strtolower($record[$name]) == strtolower(lang('Yes')) || $record[$name] == '1' ? 1 : 0);
}
}
foreach((array)$fields['date-time'] as $name) {