Skip to content

Commit

Permalink
[TASK] Avoid return type from request parseBody
Browse files Browse the repository at this point in the history
After upgrade psr/http-message to 1.1.0 the method `getParsedBody()` can
return an object in addition to array and null. To avoid errors use only `getQueryParams()`
  • Loading branch information
NarkNiro committed May 17, 2024
1 parent 01b7f2f commit aab4f74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Event/Listener/GlossarySyncButtonProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __invoke(ModifyButtonBarEvent $event): void
$buttons = $event->getButtons();
$request = $this->getRequest();

$id = (int)($request->getParsedBody()['id'] ?? $request->getQueryParams()['id'] ?? 0);
$id = (int)$request->getQueryParams()['id'] ?? 0;
$module = $request->getAttribute('module');
$normalizedParams = $request->getAttribute('normalizedParams');
$pageTSconfig = BackendUtility::getPagesTSconfig($id);
Expand Down

0 comments on commit aab4f74

Please sign in to comment.