Skip to content

Commit 0c4c36e

Browse files
authored
Merge pull request #3491 from nextcloud/backport/3490/stable5.3
[stable5.3] fix: handle undefined optionsLimitMin in multiple choice questions
2 parents 926d0f7 + da3da0b commit 0c4c36e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Service/FormsService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getQuestions(int $formId): array {
131131
}
132132

133133
// Set `isRequired` if minimum options limit is set
134-
if ($question['type'] === Constants::ANSWER_TYPE_MULTIPLE && $question['extraSettings']['optionsLimitMin'] > 0) {
134+
if ($question['type'] === Constants::ANSWER_TYPE_MULTIPLE && ($question['extraSettings']['optionsLimitMin'] ?? 0) > 0) {
135135
$question['isRequired'] = true;
136136
}
137137

0 commit comments

Comments
 (0)