[Notice] Trying to get property of non-object

GET /termine/ics/announcement-408/20190514T000000-20190514T000000

Line 683 in /var/www/vhosts/fichteschule-bottrop.de/httpdocs/event_calendar/code/Calendar.php

Source

674 			$announcement = true;
675 		}
676 		else {
677 			$id = $this->urlParams['ID'];
678 			$announcement = false;
679 		}
680 		if(is_numeric($id) && isset($this->urlParams['OtherID'])) {
681 			if(!$feed) { 
682 				$event = DataObject::get_by_id($announcement ? $this->getModel()->getEventDateTimeClass() : $this->getModel()->getEventClass(), $id);
683 				$FILENAME = $announcement ? preg_replace("/[^a-zA-Z0-9s]/", "", $event->Title) : $event->URLSegment;
684 			}
685 			else
686 				$FILENAME = preg_replace("/[^a-zA-Z0-9s]/", "", urldecode($_REQUEST['title']));
687 
688 			$FILENAME .= ".ics";
689 			$HOST = $_SERVER['HTTP_HOST'];

Trace