Skip to content
Snippets Groups Projects
Commit 1f398b65 authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

prevent php8-warnings, closes #3475

Closes #3475

Merge request studip/studip!2371
parent 05e69501
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ $options = $vote->questiondata['options'];
</thead>
<tbody>
<? $countAnswers = $vote->questionnaire->countAnswers() ?>
<? if (!empty($vote->questiondata['statements'])) : ?>
<? foreach ($vote->questiondata['statements'] as $key => $statement) : ?>
<tr>
<td>
......@@ -66,5 +67,6 @@ $options = $vote->questiondata['options'];
<? endforeach ?>
</tr>
<? endforeach ?>
<? endif ?>
</tbody>
</table>
......@@ -32,7 +32,7 @@ class LikertScale extends QuestionnaireQuestion implements QuestionType
$questiondata['description'] = \Studip\Markup::markAsHtml(
\Studip\Markup::purifyHtml($questiondata['description'])
);
$questiondata['statements'] = array_filter($questiondata['statements']);
$questiondata['statements'] = array_filter($questiondata['statements'] ?? []);
return $questiondata;
}
......
......@@ -27,7 +27,7 @@ class RangeScale extends QuestionnaireQuestion implements QuestionType
$questiondata['description'] = \Studip\Markup::markAsHtml(
\Studip\Markup::purifyHtml($questiondata['description'])
);
$questiondata['statements'] = array_filter($questiondata['statements']);
$questiondata['statements'] = array_filter($questiondata['statements'] ?? []);
return $questiondata;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment