diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index ea43c4fcb..5ca595fef 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -1238,9 +1238,7 @@ public function insertSubmission(int $formId, array $answers, string $shareHash continue; } - $question = $questions[$questionIndex]; - - $this->storeAnswersForQuestion($submission->getId(), $question, $answerArray, false); + $this->storeAnswersForQuestion($submission->getId(), $questions[$questionIndex], $answerArray, false); } $this->formsService->setLastUpdatedTimestamp($formId);