From 93edc46a7990d549325acd4dee7d1b540f1b8367 Mon Sep 17 00:00:00 2001 From: Christian Hartmann Date: Sun, 12 Jul 2026 20:43:32 +0200 Subject: [PATCH] fix: handle undefined optionsLimitMin in multiple choice questions Signed-off-by: Christian Hartmann --- lib/Service/FormsService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }