From eee35ac6ad2d7349097356d1656153f78fb2d4b6 Mon Sep 17 00:00:00 2001 From: Viktor Diezel Date: Mon, 4 Aug 2025 15:58:06 +0200 Subject: [PATCH] fix: parse arguments to CardService.reorder correctly to int Signed-off-by: Viktor Diezel --- lib/Controller/CardApiController.php | 2 +- lib/Service/CardService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/CardApiController.php b/lib/Controller/CardApiController.php index e1e9d4ca9..276892f4c 100644 --- a/lib/Controller/CardApiController.php +++ b/lib/Controller/CardApiController.php @@ -185,7 +185,7 @@ class CardApiController extends ApiController { * Reorder cards */ public function reorder($stackId, $order) { - $card = $this->cardService->reorder($this->request->getParam('cardId'), $stackId, $order); + $card = $this->cardService->reorder((int)$this->request->getParam('cardId'), (int)$stackId, (int)$order); return new DataResponse($card, HTTP::STATUS_OK); } } diff --git a/lib/Service/CardService.php b/lib/Service/CardService.php index 8fad26447..1c84771a8 100644 --- a/lib/Service/CardService.php +++ b/lib/Service/CardService.php @@ -439,7 +439,7 @@ class CardService { * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException * @throws BadRequestException */ - public function reorder($id, $stackId, $order) { + public function reorder(int $id, int $stackId, int $order) { $this->cardServiceValidator->check(compact('id', 'stackId', 'order')); $this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);