Check for valid datetime object before cloning (#3958)
This commit is contained in:
parent
3af4b1c4f8
commit
1dd6cc8a0b
1 changed files with 1 additions and 1 deletions
|
@ -1351,7 +1351,7 @@ class kolab_driver extends calendar_driver
|
|||
$record['id'] = $record['uid'];
|
||||
|
||||
// all-day events go from 12:00 - 13:00
|
||||
if ($record['end'] <= $record['start'] && $record['allday']) {
|
||||
if (is_a($record['start'], 'DateTime') && $record['end'] <= $record['start'] && $record['allday']) {
|
||||
$record['end'] = clone $record['start'];
|
||||
$record['end']->add(new DateInterval('PT1H'));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue