Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Oct 28, 2024
1 parent cfcde6b commit 8fc0ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1081,9 +1081,9 @@ public function reorderOptions(int $formId, int $questionId, array $newOrder) {
$oldOrder = $options[$arrayKey]->getOrder();

// Only set order, if it changed.
if ($oldOrder !== $arrayKey + 1) {
if ($oldOrder !== (int)$arrayKey + 1) {
// Set Order. ArrayKey counts from zero, order counts from 1.
$options[$arrayKey]->setOrder($arrayKey + 1);
$options[$arrayKey]->setOrder((int)$arrayKey + 1);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
* isRequired: bool,
* text: string,
* name: string,
* options: array<FormsOption>,
* options: list<FormsOption>,
* accept: string[],
* extraSettings: \stdClass
* extraSettings: array<string>
* }
*
* @psalm-type FormsAnswer = array{
Expand Down

0 comments on commit 8fc0ebc

Please sign in to comment.