diff --git a/stationtypes/multiplechoice/MultiplechoiceStationtypeController.inc b/stationtypes/multiplechoice/MultiplechoiceStationtypeController.inc index 1d7a4cf8..85a7ea48 100644 --- a/stationtypes/multiplechoice/MultiplechoiceStationtypeController.inc +++ b/stationtypes/multiplechoice/MultiplechoiceStationtypeController.inc @@ -112,10 +112,13 @@ } // Get status - $tried = $this->Charactergroupsqueststations->hasCharactergroupTriedStation( - $station['id'], - $charactergroup['id'] - ); + $tried = false; + if(!is_null($charactergroup)) { + $tried = $this->Charactergroupsqueststations->hasCharactergroupTriedStation( + $station['id'], + $charactergroup['id'] + ); + } // Pass data to view