Skip to content
Snippets Groups Projects
Commit ba8bea55 authored by Rasmus Fuhse's avatar Rasmus Fuhse Committed by Jan-Hendrik Willms
Browse files

Resolve "PHP8 Warning in Auswertung von Likert- und Polskala-Fragen"

Closes #4906

Merge request studip/studip!3682
parent 2cf3065a
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,10 @@ class LikertScale extends QuestionnaireQuestion implements QuestionType
[$statement_key, $options_key] = explode('_', $answer_option);
foreach ($this->answers as $answer) {
$answerData = $answer['answerdata']->getArrayCopy();
if ($answerData['answers'][$statement_key] == $options_key) {
if (
isset($answerData['answers'][$statement_key])
&& $answerData['answers'][$statement_key] == $options_key
) {
$user_ids[] = $answer['user_id'];
}
}
......
......@@ -77,7 +77,10 @@ class RangeScale extends QuestionnaireQuestion implements QuestionType
[$statement_key, $options_key] = explode('_', $answer_option);
foreach ($this->answers as $answer) {
$answerData = $answer['answerdata']->getArrayCopy();
if ($answerData['answers'][$statement_key] == $options_key) {
if (
isset($answerData['answers'][$statement_key])
&& $answerData['answers'][$statement_key] == $options_key
) {
$user_ids[] = $answer['user_id'];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment