Only set an enddate if one is available
This commit is contained in:
parent
60090ad619
commit
0691e1e537
2 changed files with 4 additions and 2 deletions
|
@ -79,7 +79,8 @@ class LocationController extends Controller
|
|||
/** @var Event $entity */
|
||||
$event = new CalendarEvent();
|
||||
$event->setStart($entity->startdate);
|
||||
$event->setEnd($entity->enddate);
|
||||
if ($entity->enddate instanceof \DateTime)
|
||||
$event->setEnd($entity->enddate);
|
||||
$event->setSummary($entity->summary);
|
||||
$event->setDescription($entity->description);
|
||||
$location = new \Jsvrcek\ICS\Model\Description\Location();
|
||||
|
|
|
@ -75,7 +75,8 @@ class TagController extends Controller
|
|||
/** @var Event $entity */
|
||||
$event = new CalendarEvent();
|
||||
$event->setStart($entity->startdate);
|
||||
$event->setEnd($entity->enddate);
|
||||
if ($entity->enddate instanceof \DateTime)
|
||||
$event->setEnd($entity->enddate);
|
||||
$event->setSummary($entity->summary);
|
||||
$event->setDescription($entity->description);
|
||||
$location = new \Jsvrcek\ICS\Model\Description\Location();
|
||||
|
|
Reference in a new issue