Recognize empty as != 0

This commit is contained in:
Nathan Gray 2011-04-06 15:40:30 +00:00
parent be3dd73dcf
commit 7b804f41a4

View File

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