diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2024-08-19 13:12:15 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-08-19 13:12:15 +0000 |
| commit | 8a316a128fef862c059df0293a4d3476d2d8d41e (patch) | |
| tree | cc8cbe480f8b8856e3347141145d48f4922ddb21 /lib/models/Vote.php | |
| parent | 94476234280903c6687479b1d4af70b11dcd91c7 (diff) | |
prevent php-warnings in Vote.php, fixes #4492
Closes #4492
Merge request studip/studip!3283
Diffstat (limited to 'lib/models/Vote.php')
| -rw-r--r-- | lib/models/Vote.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/models/Vote.php b/lib/models/Vote.php index 9a295a6..ab82ce9 100644 --- a/lib/models/Vote.php +++ b/lib/models/Vote.php @@ -149,7 +149,9 @@ class Vote extends QuestionnaireQuestion implements QuestionType } else { $userId = _('unbekannt') . ' ' . ++$countNobodys; } - $answerOption[$userId] = $options[$answerData['answers']]; + if (!empty($options[$answerData['answers']])) { + $answerOption[$userId] = $options[$answerData['answers']]; + } } $question = strip_tags($this['questiondata']['description']); |
