Skip to content

Commit

Permalink
[BUGFIX] Fix type of v1 riddle keys
Browse files Browse the repository at this point in the history
  • Loading branch information
georgringer committed Feb 14, 2023
1 parent 627eb75 commit 9d5294b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/PluginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function run(): string
}

if (MathUtility::canBeInterpretedAsInteger($riddleId)) {
return $this->getRiddleHtml($riddleId);
return $this->getRiddleHtml((int)$riddleId);
}
return $this->getRiddleHtmlV2($riddleId);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Hooks/PageLayoutView.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected function getRiddleData($id): array
{
$api = GeneralUtility::makeInstance(RiddleApi::class);
if (MathUtility::canBeInterpretedAsInteger($id)) {
$item = $api->getRiddleItem($id);
$item = $api->getRiddleItem((int)$id);
} else {
$item = $api->getRiddleItemV2($id);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Utility/RiddleUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function enrichRiddleData(array $item): array
* Get riddle ID from given flexform XML
*
* @param string $flexforms
* @return int|string
* @return string
*/
public static function getRiddleId(string $flexforms)
{
Expand Down

0 comments on commit 9d5294b

Please sign in to comment.