Skip to content

Commit eee35ac

Browse files
committed
fix: parse arguments to CardService.reorder correctly to int
Signed-off-by: Viktor Diezel <[email protected]>
1 parent 18eea35 commit eee35ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Controller/CardApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function unarchive($cardId) {
185185
* Reorder cards
186186
*/
187187
public function reorder($stackId, $order) {
188-
$card = $this->cardService->reorder($this->request->getParam('cardId'), $stackId, $order);
188+
$card = $this->cardService->reorder((int)$this->request->getParam('cardId'), (int)$stackId, (int)$order);
189189
return new DataResponse($card, HTTP::STATUS_OK);
190190
}
191191
}

lib/Service/CardService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public function rename($id, $title) {
439439
* @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
440440
* @throws BadRequestException
441441
*/
442-
public function reorder($id, $stackId, $order) {
442+
public function reorder(int $id, int $stackId, int $order) {
443443
$this->cardServiceValidator->check(compact('id', 'stackId', 'order'));
444444

445445
$this->permissionService->checkPermission($this->cardMapper, $id, Acl::PERMISSION_EDIT);

0 commit comments

Comments
 (0)