diff --git a/lib/Service/FormsService.php b/lib/Service/FormsService.php index ee3dc7434..c7a73a630 100644 --- a/lib/Service/FormsService.php +++ b/lib/Service/FormsService.php @@ -131,7 +131,7 @@ public function getQuestions(int $formId): array { } // Set `isRequired` if minimum options limit is set - if ($question['type'] === Constants::ANSWER_TYPE_MULTIPLE && $question['extraSettings']['optionsLimitMin'] > 0) { + if ($question['type'] === Constants::ANSWER_TYPE_MULTIPLE && ($question['extraSettings']['optionsLimitMin'] ?? 0) > 0) { $question['isRequired'] = true; }