diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index a34fd686c..f3f35b2cb 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -414,7 +414,7 @@ public function getQuestion(int $formId, int $questionId): DataResponse { $question = $this->formsService->getQuestion($questionId); - if ($question['id'] !== $formId) { + if ($question['formId'] !== $formId) { throw new OCSBadRequestException('Question doesn\'t belong to given Form'); }