mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
If field is not in the list of fields to be imported, do not add it in as null - could overwrite existing data
This commit is contained in:
parent
6c6259525a
commit
19ab4d3f4c
@ -368,7 +368,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
$record[$name] = date('Y-m-d H:i:s', $record[$name]);
|
||||
}
|
||||
}
|
||||
if(strlen(trim($record[$name])) == 0)
|
||||
if(array_key_exists($name, $record) && strlen(trim($record[$name])) == 0)
|
||||
{
|
||||
$record[$name] = null;
|
||||
}
|
||||
@ -392,7 +392,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
||||
$record[$name] = date('Y-m-d', $record[$name]);
|
||||
}
|
||||
}
|
||||
if(strlen(trim($record[$name])) == 0)
|
||||
if(array_key_exists($name, $record) && strlen(trim($record[$name])) == 0)
|
||||
{
|
||||
$record[$name] = null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user