From 0cfdaf8f493a082eb44b9b17684f378bde92055a Mon Sep 17 00:00:00 2001 From: oliver Date: Sat, 27 Feb 2016 17:17:38 +0100 Subject: [PATCH] fix status for Stationtype ?multiple choice? --- .../MultiplechoiceStationtypeController.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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