chg: [galaxyMatrix] Added check if event not found

pull/4635/head
mokaddem 2019-06-12 10:03:31 +02:00
parent 43a038b0a5
commit 66ee8ef12c
1 changed files with 5 additions and 0 deletions

View File

@ -4913,6 +4913,11 @@ class EventsController extends AppController
throw new Exception("Invalid options.");
}
$event = $this->Event->fetchEvent($this->Auth->user(), array('eventid' => $eventId, 'metadata' => true));
if (empty($event)) {
throw new NotFoundException(__('Event not found or you are not authorised to view it.'));
}
$scoresDataAttr = $this->Event->Attribute->AttributeTag->getTagScores($this->Auth->user(), $eventId, $matrixTags);
$scoresDataEvent = $this->Event->EventTag->getTagScores($eventId, $matrixTags);
$maxScore = 0;