calendar: avoid error during CSV import if start or end dates were not able to be parsed

This commit is contained in:
nathan 2022-11-21 11:27:11 -07:00
parent 580ff870e6
commit 543fa93c9b

View File

@ -102,7 +102,7 @@ class calendar_import_csv extends importexport_basic_import_csv {
}
// Handle errors in length or start/end date
if($record->start > $record->end)
if(is_numeric($record->start) && is_numeric($record->end) && $record->start > $record->end)
{
$record->end = $record->start + $GLOBALS['egw_info']['user']['preferences']['calendar']['defaultlength'] * 60;
$this->warnings[$import_csv->get_current_position()] = lang('error: starttime has to be before the endtime !!!');