Skip to content

Commit 1065c72

Browse files
committed
fix: corrected type cast for open questions toggle
1 parent 57eb114 commit 1065c72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

phpmyfaq/src/phpMyFAQ/Controller/Administration/Api/QuestionController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function toggle(Request $request): JsonResponse
8181
return $this->json(['error' => Translation::get(key: 'msgNoPermission')], Response::HTTP_UNAUTHORIZED);
8282
}
8383

84-
$questionId = $data->questionId;
84+
$questionId = (int) $data->questionId;
8585

8686
if (!is_null($questionId)) {
8787
$isVisible = $question->getVisibility($questionId);

0 commit comments

Comments
 (0)